Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am trying to look at column E and if it is >0 put a 1 UNLESS column D has a value. If column D has a value, I would like to copy the contents of column D. I was thinking the following formula would work, but it is giving me an error:

=IF(E2>0,1) OR IF(D2>0,D2)
share|improve this question
up vote 3 down vote accepted

Well you don't say what you want to happen if E is not > 0, but with that caveat:

=IF(E2>0, IF(D2>0, D2, 1), SOMETHING)
share|improve this answer

This will more beneficial for you. Because if cell E2 or D2 has value less then 0, then it will not work.

=IF((LEN(E2))>0,IF((LEN(D2))>0,D2,""),"Your Text Here")
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.