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. =IF(AND(M3=$B$243,N3=$C$243),L3*$D$243),IF(AND(M3=$B$244,N3=$C$244),L3*$D$244),IF(AND(M3=$B$245,N3=$C$245),L3*$D$245),IF(AND(M3=$B$246,N3=$C$246),L3*$D$246),IF(AND(M3=$B$247,N3=$C$247),L3*$D$247),IF(AND(M3=$B$248,N3=$C$248),L3*$D$248)

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.

Your parentheses are in the wrong places. As just one example...

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

),IF(AND...The

Red )does not belong there since it essentially ends the first IF statement. That means that you have novalue_if_falsefor the first IF.You've repeated that same error throughout the formula, meaning that none of your IF's have a

value_if_falseargument.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.

Ask Your Question

Weekly Poll

Do you think Monopoly should update its pieces?

Discuss in The Lounge

Poll History