Max limit of 7 nested loops

S

Subu

Hi

I have the following formula. I use this formula to collect different
values for different months (i.e.) if (month)=4,
AG160+AH160+AI160+AJ160, if (month)=5, AG160+AH160+AI160+AJ160+AK160
and so on .....

The actual formula is

=IF($J$1=4,AG160+AH160+AI160+AJ160,IF($J$1=6,AG160+AH160+AI160+AJ160+AK160+AL160,IF($J$1=7,SUM(AG160:AM160),IF($J$1=8,AG160+AH160+AI160+AJ160+AK160+AL160+AM160+AN160,IF($J$1=9,AG160+AH160+AI160+AJ160+AK160+AL160+AM160+AN160+AO160,IF($J$1=10,AG160+AH160+AI160+AJ160+AK160+AL160+AM160+AN160+AO160+AP160,IF($J$1=11,AG160+AH160+AI160+AJ160+AK160+AL160+AM160+AN160+AO160+AP160+AQ160,IF($J$1=12,AG160+AH160+AI160+AJ160+AK160+AL160+AM160+AN160+AO160+AP160+AQ160+AR160,0))))))))

However I am stuck now with the max limit of 7 nested loops - hence
manually changing the formula from month to month .....

is there a way I can do this once and for all (i.e.) without having to
change month to month ?


Thanks

Subu
 
L

Leo Heuser

Hi Subu

In this situation you can use this formula:

=SUM(OFFSET($AG$160,,,,$J$1))
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top