Hi,
I am trying to calculate the average from a table using the averageifs function, because I only want to take into account the numbers between the lower and upper boundary (LB and UB). I know I need to use the subtotal function to not take into account the hidden cells. I could not find another post satisfying my case so I hope someone can help me on this one.
In the photo, which you can find attached, I have tried to visualise the problem.
- The first table is de unfiltered table, the second table is the same table but filtered on week "1".
- When using the normal average function it averages all the values, which is not wat I want.
- When using the subtotal function it averages only the visible values. This is a step in the right direction. However, I want it to exclude the values above 4 and below 1.
- I tried it with the formula: AVERAGE(IF(SUBTOTAL(9,OFFSET(Test6[[#Headers],[Value]],ROW(Test6[Value])-ROW(Test6[[#Headers],[Value]]),0,1))<C3,Test6[Value])), which I found online. This unfortunately does not work.
How should I write the function for excel to calculate the average with the values between the boundaries?
I hope I made myself clear.
Kind regards,
XFG
I am trying to calculate the average from a table using the averageifs function, because I only want to take into account the numbers between the lower and upper boundary (LB and UB). I know I need to use the subtotal function to not take into account the hidden cells. I could not find another post satisfying my case so I hope someone can help me on this one.
In the photo, which you can find attached, I have tried to visualise the problem.
- The first table is de unfiltered table, the second table is the same table but filtered on week "1".
- When using the normal average function it averages all the values, which is not wat I want.
- When using the subtotal function it averages only the visible values. This is a step in the right direction. However, I want it to exclude the values above 4 and below 1.
- I tried it with the formula: AVERAGE(IF(SUBTOTAL(9,OFFSET(Test6[[#Headers],[Value]],ROW(Test6[Value])-ROW(Test6[[#Headers],[Value]]),0,1))<C3,Test6[Value])), which I found online. This unfortunately does not work.
How should I write the function for excel to calculate the average with the values between the boundaries?
I hope I made myself clear.
Kind regards,
XFG