IF Statement question

G

gryfon

I can this statement to work

=SUM(IF(C3<112,(0),IF(C3<298,SUM(C3*0.17)-19.04)))
but when I add to it like this

=SUM(IF(C3<112,(0),IF(C3<298,SUM(C3*0.17)-19.04),IF(C3<322,SUM(C3*0.37)-78.7669))
I get error message "Too many arguements for this function"

Can someone tell me where I'm going wrong
TIA
 
B

Biff

Hi!

Well, for starters, you don't need any of the SUM
functions in either formula. They're basically doing
nothing. They're just summing a single number returned by
a particular IF function.

You can write those formulas as:

=IF(C3<112,0,IF(C3<298,C3*0.17-19.04))

=IF(C3<112,0,IF(C3<298,C3*0.17-19.04,IF(C3<322,C3*0.37-
78.7669)))

In both cases however, if C3 >= 298 and 322 in each
respective formula, You'll get a return of FALSE since you
haven't defined that variable at the end of either formula.

Biff
 
J

JE McGimpsey

Couple of things:

1) You don't need the SUM()s

2) Try

=IF(C3<112,0,IF(C3<298,C3*0.17-19.04,IF(C3<322,C3*0.37-78.7889,"Greater
than or equal to 322")))
 
M

Myrna Larson

You aren't nesting the IF statements properly. The right parenthesis after the
19.04 doesn't belong there, but rather at the end of the formula, like this:

=SUM(IF(C3<112,(0),IF(C3<298,SUM(C3*0.17)-19.04,IF(C3<322,SUM(C3*0.37)-78.7669))))

BUT you don't need any SUM functions. You use SUM when you want to add several
numbers. You aren't doing that. This should be written as

=IF(C3<112,0,IF(C3<298,C3*0.17-19.04,IF(C3<322,C3*0.37-78.7669)))
 
A

Aladin Akyurek

=IF(C3<112,0,IF(C3<298,(C3*0.17)-19.04,IF(C3<322,(C3*0.37)-78.7669,"Not
Defined")))

When C3 >= 322, you'll get "Not Defined".
 
G

gryfon

Thanks, Works like a charm.
Biff said:
Hi!

Well, for starters, you don't need any of the SUM
functions in either formula. They're basically doing
nothing. They're just summing a single number returned by
a particular IF function.

You can write those formulas as:

=IF(C3<112,0,IF(C3<298,C3*0.17-19.04))

=IF(C3<112,0,IF(C3<298,C3*0.17-19.04,IF(C3<322,C3*0.37-
78.7669)))

In both cases however, if C3 >= 298 and 322 in each
respective formula, You'll get a return of FALSE since you
haven't defined that variable at the end of either formula.

Biff
 
Top