Need help with function- clueless

K

kirk

I need help with a function
I want to be able to have a formula that searches /query
a cell. If that cell B28 is less than zero it would use
the below formula
=SUM(B18/B28)-(B28*B5*2)-(B28*B6*2)
If b28 was zero or greater it would use the formula below
or perhaps just add +2 to the formula above
=SUM(c18/c28)-(c28*c5*2)-(c28*c6*2)
 
K

Ken Wright

=IF(B28<0,(B18/B28)-(B28*B5*2)-(B28*B6*2),(C18/C28)-(C28*C5*2)-(C28*C6*2))

or

=IF(B28<0,(B18/B28)-B28*2*(B5+B6),(C18/C28)-C28*2*(C5+C6))

or

=IF(B28<0,(B18/B28)-(B28*B5*2)-(B28*B6*2),(B18/B28)-(B28*B5*2)-(B28*B6*2)+2)

The use of SUM as you had it originally was not needed
 
H

Haldun Alay

hi,

=IF(B28<0,SUM(SUM(B18/B28)-(B28*B5*2)-(B28*B6*2),SUM(c18/c28)-(c28*c5*2)-(c2
8*c6*2))

--
Regards

Haldun Alay

To e-mail me, please remove AT and DOT from my e-mail address.
 
P

Peo Sjoblom

=IF(B28>0,(B18/B28)-(B28*B5*2)-(B28*B6*2),(C18/C28)-(C28*C5*2)-(C28*C6*2))

no need for sum, you might want to check for C28 being greater than zero as
well
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top