Multiple if formula syntax...not nested, just sequential

jennyrabbit

Board Regular
Joined
Jun 16, 2003
Messages
78
What is wrong with this? I have three criteria I want to use, and I keep getting a message saying there are too many arguments. Thanks in advance.

=IF(A6=$W$2,C6+$X$2,IF(A6=$W$3,C6+$X$3),IF(A6=$W$4,C6+$X$4))
 

Excel Facts

Does the VLOOKUP table have to be sorted?
No! when you are using an exact match, the VLOOKUP table can be in any order. Best-selling items at the top is actually the best.
Your if statement has 4 criteria

=IF(A6=$W$2,C6+$X$2,IF(A6=$W$3,C6+$X$3),IF(A6=$W$4,C6+$X$4))

Criteria 1: A6=$W$2
Criteria 2: C6+$X$2
Criteria 3: IF(A6=$W$3,C6+$X$3)
Criteria 4: IF(A6=$W$4,C6+$X$4)

You can of course only have 3
I have a feeling you made a simple error, so let me know if you need more help

clay
 
Upvote 0
You have

=IF(A6=$W$2,C6+$X$2,IF(A6=$W$3,C6+$X$3),IF(A6=$W$4,C6+$X$4))

Should be

=IF(A6=$W$2,C6+$X$2,IF(A6=$W$3,C6+$X$3,IF(A6=$W$4,C6+$X$4,???)))

??? is a possible condition you should consider (not = to $W$2,3,or 4)
 
Upvote 0
Move that first closed parenthesis to the end:

=IF(A6=$W$2,C6+$X$2,IF(A6=$W$3,C6+$X$3,IF(A6=$W$4,C6+$X$4)))

But your subject implies you don't want to nest these statements. If A6 must be equal to either W2, W3, or W4, you can forego the last IF statment. Otherwise, you should put in a result at the end of your final IF statement in case A6 is not equal to any of W2, W3, or W4.
 
Upvote 0

Forum statistics

Threads
1,215,219
Messages
6,123,678
Members
449,116
Latest member
HypnoFant

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top