More than 7 arguments in an "IF" formula

marcie

New Member
=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

Is there a shortcut key for strikethrough?
Ctrl+S is used for Save. Ctrl+5 is used for Strikethrough. Why Ctrl+5? When you use hashmarks to count |||| is 4, strike through to mean 5.
Thanks so much!!!! Worked!!!!!

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

Replies
8
Views
487
Replies
1
Views
303
Replies
22
Views
1K
Replies
17
Views
871
Replies
3
Views
487

1,221,384
Messages
6,159,544
Members
451,571
Latest member
Qwissy

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.

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

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