I have two conditions and then a formula to

June 28, 2011 at 07:48:20
Specs: Windows XP
I have two conditions and depending on the condition it will be mulitplied by a certain number. Below is how I believe the formula should look but I am getting #VALUE! rather than the number value I need.


See More: I have two conditions and then a formula to

Report •

June 28, 2011 at 08:03:07
I actually found my error is related to parathesis. I should not have had one before my comma and next IF, also I did not have the correct amount at the end. Maybe my example will help someone else, thanks.

Report •

June 28, 2011 at 08:20:46
Your parentheses are in the wrong places.

As just one example...


The Red ) does not belong there since it essentially ends the first IF statement. That means that you have no value_if_false for the first IF.

You've repeated that same error throughout the formula, meaning that none of your IF's have a value_if_false argument.

Place your cursor in the formula bar and use the right arrow to move through the formula. You'll see that basically what you have is a bunch of independent IF statements, one right after the other.

Frankly, I'm surprised that Excel even accepted the formula, but I'm not going to try and figure out why.

A Nested IF should look something like this:

=IF(AND(M3=$B$243,N3=$C$243),L3*$D$243, IF(AND(M3=$B$244,N3=$C$244),L3*$D$244 ,IF(AND(...)))

Eventually, at the end of the entire formula, you'll have multiple close parentheses to close all of the IF's.

Click Here Before Posting Data or VBA Code ---> How To Post Data or Code.

Report •
Related Solutions

Ask Question