K
klm
I've used the following formula
=IF($E$4=1;C11;IF($E$4=2;SUM(C11:C12);IF($E$4=3;SUM(C11:C13);IF($E$4=4;SUM(C11:C14);"na"))))
to sum values in either one, two, three or four rows of data, depending on
the value in cell E4. If I want to go beyond the value 4 I need to add
another nested If statement.
Can I generate a formula that expands the sum range, depending on the value
of cell E4?
=IF($E$4=1;C11;IF($E$4=2;SUM(C11:C12);IF($E$4=3;SUM(C11:C13);IF($E$4=4;SUM(C11:C14);"na"))))
to sum values in either one, two, three or four rows of data, depending on
the value in cell E4. If I want to go beyond the value 4 I need to add
another nested If statement.
Can I generate a formula that expands the sum range, depending on the value
of cell E4?