Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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

2 Answers 2

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

 
discard

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.