Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Assume I have the following data:
A1 B1 C1 D1 E1 F1 3 5 4 6 1 2 in cell H1 is the number of columns I want to average. It can be a number from 1 to 6. Assume 3 H1 3 So I have this formula in Cell I1 =IF(H1=1,F1,IF(H1=2,AVERAGE(E1:F1),IF(H1=3,AVERAGE (D1:F1),IF(H1=4,AVERAGE(C1:F1),IF(H1=5,AVERAGE(B1: F1),AVERAGE(A1,F1)))))) Is there an easier way to do this without a nested if? That H1 determines how many columns to average. DG |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Nested IF statement not need help | Excel Discussion (Misc queries) | |||
If statement nested | Excel Discussion (Misc queries) | |||
Nested If Statement | Excel Discussion (Misc queries) | |||
Nested IF/AND Statement | Excel Discussion (Misc queries) | |||
7+ nested if statement? | Excel Worksheet Functions |