More than 7 arguments in an "IF" formula

marcie

New Member
Joined
Oct 1, 2006
Messages
2
=IF(D$14=7,EE20,IF(D$14=8,EE20+ET20,IF(D$14=9,EE20+ET20+FI20,IF(D$14=10,EE20+ET20+FI20+FX20,IF(D$14=11,EE20+ET20+FI20+FX20+GM20,IF(D$14=12,EE20+ET20+FI20+FX20+GM20+HB20))))))


This is what I have so far. D14 refers to a fiscal month (the user enters 1 for Feb etc). EE20 would represent Feb sales. I need to enter if's for the whole year-help.

Thanks
Marcie
 

Excel Facts

Ambidextrous Undo
Undo last command with Ctrl+Z or Alt+Backspace. If you use the Undo icon in the QAT, open the drop-down arrow to undo up to 100 steps.
Hi Marcie and welcome to MrExcel!

Here's another way of doing this without using an IF formula. Try the following formula:

=SUMPRODUCT(N(INDIRECT({"EE20","ET20","FI20","FX20","GM20","HB20"})),--({1,2,3,4,5,6}<=D14))

As you add more cell references in the first array (ie after "HB20") then add additional month numbers into the second array (ie after 6) - each array must have the same number of values for this to work.

Andrew
 
Upvote 0

Forum statistics

Threads
1,213,536
Messages
6,114,215
Members
448,554
Latest member
Gleisner2

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