if then else conditions

W

wrosie

Someone helped me with this previously, and I accidentally cleared the
information (and the location of the post) from my computer. Ugh!

I'd appreciate help once again, and I promise not to lose it this time.

I need an If Then Else statement to combine the following:

If E > 0, then H2-E2
If E2=0 and F2=0, then H2-D2

THANKS!
 
B

Bob Phillips

=IF(E2>0,H2-E2,IF(AND(E2=0,F2=0),H2-D2),"")

What about

E2 = 0, F2 <> 0
E2 <0?

--
HTH

Bob Phillips

(remove nothere from email address if mailing direct)
 
W

wrosie

Thanks...we're almost there! When I input your formula, it tells me there are
too many arguments for this function. If I use it without the final set ofd
quotation marks, it inserts FALSE in the cells where F2 has a value. I need
it to be blank any time F has a value.
 
B

Bob Phillips

Bracket in wrong place

=IF(E2>0,H2-E2,IF(AND(E2=0,F2=0),H2-D2,""))

--
HTH

Bob Phillips

(remove nothere from email address if mailing direct)
 
W

wrosie

Perfect! MANY thanks!

Bob Phillips said:
Bracket in wrong place

=IF(E2>0,H2-E2,IF(AND(E2=0,F2=0),H2-D2,""))

--
HTH

Bob Phillips

(remove nothere from email address if mailing direct)
 
Top