Conditional equation

Closed
kpoirier Posts 1 Registration date Monday January 14, 2013 Status Member Last seen January 14, 2013 - Jan 14, 2013 at 05:41 PM
rizvisa1 Posts 4478 Registration date Thursday January 28, 2010 Status Contributor Last seen May 5, 2022 - Jan 14, 2013 at 05:57 PM
Hello,

I am desperately trying to write a formula for the following:

If C23 is less than 2 but greater than zero, then value of E14, and if not, then (C23-2)*E15+E14.

I pretty much have it, but if I make C23 zero or leave it blank its shows 150. If C23 is blank or zero then the cell should be blank or zero.

This is what I have now: =IF((AND(C23<2, C23>0)), 300,(C23-2)*E15+E14)

Any suggestions would be greatly appreciated. Thank you!

1 response

rizvisa1 Posts 4478 Registration date Thursday January 28, 2010 Status Contributor Last seen May 5, 2022 766
Jan 14, 2013 at 05:57 PM
Well you can have nested if
(for blank)
=IF(OR(C23=0, C23=""),"", IF((AND(C23<2, C23>0)), 300,(C23-2)*E15+E14) )

or
for zero
=IF(OR(C23=0, C23=""),0, IF((AND(C23<2, C23>0)), 300,(C23-2)*E15+E14) )
0