90th Percentile Calc for Grouped Items

camarcano

New Member
Joined
Jun 3, 2021
Messages
2
Office Version
  1. 365
  2. 2019
  3. 2016
  4. 2013
  5. 2011
Platform
  1. Windows
  2. Mobile
  3. Web
Hello!

Hope you are doing great. I have a long list with the following structure:

Name Res 90th P Res
A 110.8 113.2
A 115.6
A 105.8
A 106.2
A 104.9
A 102.2
B 114.1 113.44
B 111.9
B 109.8
B 110.8
C 108.5 108.98
C 108
C 109.7
C 108.4
C 102.2
C 101.8
C 96.7

In column "Name" there are a lot of items grouped by its name, under column "Res" there are data points for different events belonging to each item in column "Name". What I need to do is to automatically calculate the 90th percentile for the events in "Res" that belong to each item in "Name". I manually did for the example here, but I had to manually pick each range for each name (A, B and C) which for a long list is impossible to do.

Is there a way to do the calculation for each group without knowing the size of each group (the array) for the PERCENTILE formula?

Thanks in advance for your time and help!

Regards,

Carlos.
 

Excel Facts

Excel Can Read to You
Customize Quick Access Toolbar. From All Commands, add Speak Cells or Speak Cells on Enter to QAT. Select cells. Press Speak Cells.
Maybe one of the options below.
These are array formulas and must be enter with CTRL-SHIFT-ENTER (except in Excel 365 just ENTER).

Book1
ABCDEF
1NameRes90th P ResName90th P Res
2A110.8113.2A113.2
3A115.6 B113.44
4A105.8 C108.98
5A106.2 
6A104.9 
7A102.2 
8B114.1113.44
9B111.9 
10B109.8 
11B110.8 
12C108.5108.98
13C108 
14C109.7 
15C108.4 
16C102.2 
17C101.8 
18C96.7 
Sheet1
Cell Formulas
RangeFormula
F2:F4F2=PERCENTILE.INC(IF($A$2:$A$18=E2,$B$2:$B$18),0.9)
C2:C18C2=IF(COUNTIF($A$2:$A2,A2)=1,PERCENTILE.INC(IF($A$2:$A$18=A2,$B$2:$B$18),0.9),"")
 
Upvote 0
Solution
Maybe one of the options below.
These are array formulas and must be enter with CTRL-SHIFT-ENTER (except in Excel 365 just ENTER).

Book1
ABCDEF
1NameRes90th P ResName90th P Res
2A110.8113.2A113.2
3A115.6 B113.44
4A105.8 C108.98
5A106.2 
6A104.9 
7A102.2 
8B114.1113.44
9B111.9 
10B109.8 
11B110.8 
12C108.5108.98
13C108 
14C109.7 
15C108.4 
16C102.2 
17C101.8 
18C96.7 
Sheet1
Cell Formulas
RangeFormula
F2:F4F2=PERCENTILE.INC(IF($A$2:$A$18=E2,$B$2:$B$18),0.9)
C2:C18C2=IF(COUNTIF($A$2:$A2,A2)=1,PERCENTILE.INC(IF($A$2:$A$18=A2,$B$2:$B$18),0.9),"")

I went for the first option, and it works beautifully, thanks!
 
Upvote 0

Forum statistics

Threads
1,223,891
Messages
6,175,229
Members
452,621
Latest member
Laura_PinksBTHFT

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