"If" formula help

R

Rob

Here is the formula I am using...

=IF((C35*0.85-F35-G35+I35)<=0,"0","(C35*0.85-F35-G35+I35)")

So, If the answer the the first formula (C35*0.85-F35-G35+I35) is <=0, then
it should return 0. THis part works.

If the answer to the first formula (C35*0.85-F35-G35+I35) is not <=0, then I
want it to return the answer to the forumla C35*0.85-F35-G35+I35. It is
simply returning the formula, not the answer.

What am I going wrong. I have tried all kinds of things, and can't get it
to work...

Rob
 
P

Paul B

Rob, try this, =IF((C35*0.85-F35-G35+I35)<=0,0,(C35*0.85-F35-G35+I35))
--
Paul B
Always backup your data before trying something new
Please post any response to the newsgroups so others can benefit from it
Feedback on answers is always appreciated!
Using Excel 2002 & 2003
 
D

Dave F

It's not returning a formula. It's just returning a string of text that
looks like your formula. Notice that you have double quotation marks around
the formula. Eliminate those:

=IF((C35*0.85-F35-G35+I35)<=0,"0",(C35*0.85-F35-G35+I35))

It's also not clear what you intend your calculation to be here. Do you
mean for C35*.85 to be calculated and then from that product, subtract F35,
G35 and add I35? For auditing purposes in the future, if that's the math you
intend you may want to re-write the formula like this:

=IF((C35*0.85)-F35-G35+I35)<=0,"0",((C35*0.85)-F35-G35+I35))

Dave
 
D

David Biddulph

Rob said:
Here is the formula I am using...

=IF((C35*0.85-F35-G35+I35)<=0,"0","(C35*0.85-F35-G35+I35)")

So, If the answer the the first formula (C35*0.85-F35-G35+I35) is <=0,
then
it should return 0. THis part works.

If the answer to the first formula (C35*0.85-F35-G35+I35) is not <=0, then
I
want it to return the answer to the forumla C35*0.85-F35-G35+I35. It is
simply returning the formula, not the answer.

What am I going wrong. I have tried all kinds of things, and can't get it
to work...

The quote marks tell it to return a text string, so that's what you got
(both a text string of zero, and a text string for the formula).

Try
=IF((C35*0.85-F35-G35+I35)<=0,0,C35*0.85-F35-G35+I35)
 
R

Rob

Dave, you are also right on, thanks...

Dave F said:
It's not returning a formula. It's just returning a string of text that
looks like your formula. Notice that you have double quotation marks around
the formula. Eliminate those:

=IF((C35*0.85-F35-G35+I35)<=0,"0",(C35*0.85-F35-G35+I35))

It's also not clear what you intend your calculation to be here. Do you
mean for C35*.85 to be calculated and then from that product, subtract F35,
G35 and add I35? For auditing purposes in the future, if that's the math you
intend you may want to re-write the formula like this:

=IF((C35*0.85)-F35-G35+I35)<=0,"0",((C35*0.85)-F35-G35+I35))

Dave
 
D

David Biddulph

The quote marks tell it to return a text string, so that's what you got
(both a text string of zero, and a text string for the formula).

Try
=IF((C35*0.85-F35-G35+I35)<=0,0,C35*0.85-F35-G35+I35)

.... but a simpler option is
=MAX(C35*0.85-F35-G35+I35,0)
 
B

Brad

An easier solution =max(0,C35*0.85-F35-G35+I35). If the calculated number is
less than zero - your answer will be zero - else it will be calculated answer
 

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