Whats wrong with this formula?????

J

Jen Hearns

First of all, I want to thank you guys, you are great!! I have this
formula in a cel, and as soon as I add the last line, it comes up
saying my formula has an error.


=IF(AND(C3=0,C11=1),C7+(I7*2),
IF(AND(C3=1,C11=1),L2+(I7*2),
IF(AND(C3=0,C11=2),C7+(I7*2),
IF(AND(C3=2,C11=2),L2+(I7*2),
IF(AND(C3=0,C11=4),C7+(I7*2),
IF(AND(C3=4,C11=4),L2*2+(I7*2),
IF(AND(C3=0,C11=44),C7+(I7*2),
IF(AND(C3=44,C11=44),c7+(i7*2))))))))

am I past the amount of formulas, or characters I am allowed to use?
 
P

Paul Corrado

Jen

You have exceeded the maximum number of nested IF functions, 7. Plus I
think you have more arguments then you need. It looks like you are saying
if C3=C11 use L2 and if C3<>C11 use C7

=(C3<>C11)*(C7)+(C3=C11)*(L2)+(i7*2)

Should work

HTH

PC
 
M

mike

I believe you are past the amount of conditions excel will
allow the help section states:

"You can enter, or nest, no more than seven levels of
functions within a function."

However I have been able to get away with 8 levels which
you have so I really am not helping you am I?
 
M

Mark Graesser

You can get aroud the limit of 7 nested IF's by not nesting. Try:

=IF(AND(C3=0,C11=1),C7+(I7*2),0)+IF(AND(C3=1,C11=1),L2+(I7*2),0)+IF(AND(C3=0
,C11=2),C7+(I7*2),0)+IF(AND(C3=2,C11=2),L2+(I7*2),0)+IF(AND(C3=0,C11=4),C7+(
I7*2),0)+IF(AND(C3=4,C11=4),L2*2+(I7*2),0)+IF(AND(C3=0,C11=44),C7+(I7*2),0)+
IF(AND(C3=44,C11=44),C7+(I7*2),0)

Each IF statement will produce zero except for the one which is true. The
formula then adds them all up. Since the IF's aren't nested there is no
limit that I have run into.

Good Luck,
Mak Graesser
 

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