Formula help

L

Lovelock, David

I am trying to compare the sum of two cells with 30, if that sum i
between zero and 30 I want to fill a value of 30 minus the sum of th
two cells, if the value of the two cells is greater than thirty the
this cell should be zero. I wrote the following formula to start wit
and it doesn't work, any ideas?:

=IF(0<(C33+C39)<30,30,0)

I figured if I could get this formula working then I could replace th
",30," with ((C33+C39)-30
 
B

Bob Phillips

David,

Try this

=IF(AND(C33+C39>0,C33+C39<30),30-C33-C39,0)

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)
 
A

Andy B

David

Sorry, I misread your question. Try this instead!

=IF(AND(C33+C39>0, C33+C39<30),30-(C33+C39),0)

Andy
 
F

Freemini

Try
=IF(AND(C33+C39<30,C33+C39>0),30-(C33+C39),0)

Hope this is what you wanted.

Mik
 
Top