I really hope that someone can assist me with this one! I use a lot of if statements in the workbooks that i produce. I have noticed that you can only have a 7 level nested If statement if you type the formula into a cell. I am not very good with the vb in excel but i kind of think that i must be able to write the statement into a module of some kind? Below is a cut down version of the type of statement i want to write. I have a sheet called stat where i want to display cells from other sheets. The sheets are called 1,2,3,4 and 5 in the example but go up to 53 in the real thing.
=IF($E$10=1,'1'!C3,IF(stat!$E$10=2,'2'!C3,IF(stat!$E$10=3,'3'!C3,IF(stat!$E$10=4,'4'!C3,IF(stat!$E$10=5,'5'!C3,IF(stat!$E$10="all",('1'!C3+'2'!C3+'3'!C3+'4'!C3+'5'!C3),""
)))))
The idea behind it is that the user, (my mother bless her!) can go to the stat sheet type a number between 1 and 53 in a cell and it will display the data for that week. I hope i have explained it clearly.
many thanks
James
)
=IF($E$10=1,'1'!C3,IF(stat!$E$10=2,'2'!C3,IF(stat!$E$10=3,'3'!C3,IF(stat!$E$10=4,'4'!C3,IF(stat!$E$10=5,'5'!C3,IF(stat!$E$10="all",('1'!C3+'2'!C3+'3'!C3+'4'!C3+'5'!C3),""
The idea behind it is that the user, (my mother bless her!) can go to the stat sheet type a number between 1 and 53 in a cell and it will display the data for that week. I hope i have explained it clearly.
many thanks
James