Subtotal STDev - With Criteria

georgepet

New Member
Joined
Jan 20, 2011
Messages
29
Hi,

I have a flat table with the auto filter function. In column D2:D1000 I have 'Position' (e.g. Prop, Hooker, Scrum Half). In column G2:G1000 I have a score (e.g. 15.0, 15.7).

In my subtotal table, I wish to have results that represent the scores of each position. The usual =SUBTOTAL function does not allow this as it uses all the positional data regardless of filtering (I only wish to ever filter one other column, Level of Player).

I have managed to work out how to find the number of players:

=SUMPRODUCT(SUBTOTAL(2,OFFSET('January 2010'!$G$2:$G$1000,ROW('January 2010'!$G$2:$G$1000)-MIN(ROW('January 2010'!$G$2:$G$1000)),,1)),--('January 2010'!$D$2:$D$1000="Prop"))

And the average of the scores:

=SUMPRODUCT(SUBTOTAL(3,OFFSET('January 2010'!$D$2,ROW('January 2010'!$D$2:$D$1000)-ROW('January 2010'!$D$2),,1)),--('January 2010'!$D$2:$D$1000="Prop"),'January 2010'!$G$2:$G$1000)/SUMPRODUCT(SUBTOTAL(3,OFFSET('January 2010'!$G$2,ROW('January 2010'!$D$2:$D$1000)-ROW('January 2010'!$D$2),,1)),--('January 2010'!$D$2:$D$1000="Prop"))

But now I wish to find the standard deviation of this average!

I hope by pasting my previous formulas, some brightspark may be able to help me?

Thank you for reading this anyway!
 
You are amazing!

I cannot understand the reason for your persistence with this but it is truly incredible and truly appreciated. Thank you so much. I hope you have not wasted any time doing proper things!!!

Thank you so much again Tinus.
 
Upvote 0

Excel Facts

Return population for a City
If you have a list of cities in A2:A100, use Data, Geography. Then =A2.Population and copy down.
I hate not being able to do something in excel. I learnt alot through this process as well. What I have showed you is a new trick I would not have learnt without your query.

So you're welcome and thanks from me too.
 
Upvote 0
Tinus, I have one final challenge for you.

I have tried but failed...

I am attempting to find the top 10% score boundary in each position every time I filter. For example, If I have 50 players in the Prop position, I am looking for the score of the player ranked 5th best.

I would normally calculate it this way:

=LARGE(range,(COUNT(range)*0.1))

I am having difficulty fitting this into my final table. Do you have any ideas?
 
Upvote 0
How about:

=LARGE(IF(E2:E48=1,D2:D48,""),COUNT(IF(E2:E48=1,D2:D48,""))*0.1)

D column is scores, E column is SUBTOTAL(102,..) formula
 
Upvote 0

Forum statistics

Threads
1,223,246
Messages
6,170,996
Members
452,373
Latest member
TimReeks

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top