subtotal question

ghardy

New Member
Joined
Nov 21, 2005
Messages
1
I have a list of times could be either in [h]:mm format or in minutes formatted as a number. These times represent the length of stay in a service process. With subtotal function I can determine “average, stddev, min and max instantly as I filter the data set based upon selection criteria. It is important to also know the 95th percentile of the filtered-selected data. Is there some way to build a calculation of subtotal functions or another way to display the answer each time I change the selection criteria so that the formula only works against the filtered data the way the subtotal function works?.

additionally I need to put this into a macro where the range for the subtotal will change dynamically. each day the column count can be a different lenght and I need to have the cell range expand or contract similar to the <control-shift-arrow down> method to capture the entire column reguardless of the changing size. this way the macro can be run and it wont be necessary to rekey the formula each day.

Thank you

George Hardy
 

Excel Facts

Copy formula down without changing references
If you have =SUM(F2:F49) in F50; type Alt+' in F51 to copy =SUM(F2:F49) to F51, leaving the formula in edit mode. Change SUM to COUNT.
Try the following formula that needs to be confirmed with CONTROL+SHIFT+ENTER, not just ENTER...

=PERCENTILE(IF(SUBTOTAL(3,OFFSET(Range,ROW(Range)-MIN(ROW(Range)),0,1)),Range),K)

...where K is the percentile value.

Hope this helps!
 
Upvote 0

Forum statistics

Threads
1,224,265
Messages
6,177,538
Members
452,782
Latest member
ZCapitao

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