Conditional equation [Closed]

Report
Posts
1
Registration date
Monday January 14, 2013
Status
Member
Last seen
January 14, 2013
-
Posts
4476
Registration date
Thursday January 28, 2010
Status
Contributor
Last seen
August 2, 2020
-
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 reply

Posts
4476
Registration date
Thursday January 28, 2010
Status
Contributor
Last seen
August 2, 2020
768
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) )

Subscribe To Our Newsletter!

The Best of CCM in Your Inbox

Subscribe To Our Newsletter!