ashleighbrown
New Member
- Joined
- Mar 10, 2023
- Messages
- 8
- Office Version
- 2016
- Platform
- Windows
Hi,
I'm trying to write a formula that calculates the average of a score (a decimal value) depending upon what level the assessment was (1-6), so there is an average score for each assessment level. However I'd like for the formula to display the average score depending upon the visible data so if the sheet is filtered by a class it'll update to show that classes average and not the overall. However the formula is pulling a '#VALUE!' error and I can't work out why as I'm not super familiar with some of the functions like ROW and OFFSET I'm having to use.
The formula as it stands is:
=AVERAGE(IF(SUBTOTAL(2,OFFSET(S55,ROW(S55:S60)-ROW(S55),0)),IF(R55:R60="1",S55:S60)))
Where the data it is looking at is
:
(This isn't the actual data but I was practicing on some random values that are structured the same to see if I could work out what the issue is, so its definitely a typed value with no spaces so I don't think that is the issue)
If anyone has any ideas it would be super helpful!
Thank you
I'm trying to write a formula that calculates the average of a score (a decimal value) depending upon what level the assessment was (1-6), so there is an average score for each assessment level. However I'd like for the formula to display the average score depending upon the visible data so if the sheet is filtered by a class it'll update to show that classes average and not the overall. However the formula is pulling a '#VALUE!' error and I can't work out why as I'm not super familiar with some of the functions like ROW and OFFSET I'm having to use.
The formula as it stands is:
=AVERAGE(IF(SUBTOTAL(2,OFFSET(S55,ROW(S55:S60)-ROW(S55),0)),IF(R55:R60="1",S55:S60)))
Where the data it is looking at is
:
(This isn't the actual data but I was practicing on some random values that are structured the same to see if I could work out what the issue is, so its definitely a typed value with no spaces so I don't think that is the issue)
If anyone has any ideas it would be super helpful!
Thank you