Dynamically calculate range within PERCENTILE.INC() formula

Mihos

New Member
Joined
Jun 23, 2014
Messages
7
I have a large data set where the data is delineated by a field called "Category." For each Category, I'd like to calculate the PERCENTILE.INC for each row within that Category. For example, here is some sample data with the (manual) formula. I'd like a way to automatically calculate the range variable because I need to run PERCENTILE.INC for many hundreds of Categories and each one has a different range length. (I'm on Windows 7, Excel 2010)

ABCD
1CategoryIDImpactCALC
2ACOUSTICS010.365=PERCENTILE.INC(C2:C6,[@[Impact]])
3ACOUSTICS020.721=PERCENTILE.INC(C2:C6,[@[Impact]])
4ACOUSTICS031.022=PERCENTILE.INC(C2:C6,[@[Impact]])
5ACOUSTICS040.912=PERCENTILE.INC(C2:C6,[@[Impact]])
6ACOUSTICS050.393=PERCENTILE.INC(C2:C6,[@[Impact]])
7AGRONOMY061.227=PERCENTILE.INC(C7:C9,[@[Impact]])
8AGRONOMY072.001=PERCENTILE.INC(C7:C9,[@[Impact]])
9AGRONOMY080.991=PERCENTILE.INC(C7:C9,[@[Impact]])

<tbody>
</tbody>

 
Last edited:

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.
Apologies for the title but I think "array" is probably more appropriate than "range" for what I'm trying to do. Hopefully you get the point though.
 
Upvote 0
Oh man, that is soooo close and I think the reason is because I mistyped and wrote PERCENTILE.INC instead of PERCENTRANK.INC in the original post. So my actual formula was =PERCENTRANK.INC(C2:C6,[@[Impact]]). It also looks like the formula is calculating for each Category though, while I want it to calculate for each row within each category. So, here's what the results should look like in my example (if it's calculating the PercentRank.inc for each row within each Category):

ABCD
1CategoryIDImpactCALC
2ACOUSTICS10.3650
3ACOUSTICS20.7210.5
4ACOUSTICS31.0221
5ACOUSTICS40.9120.75
6ACOUSTICS50.3930.25
7AGRONOMY61.2270.5
8AGRONOMY72.0011
9AGRONOMY80.9910


<colgroup><col style="font-weight: bold; width: 30px;"><col style="width: 82px;"><col style="width: 64px;"><col style="width: 64px;"><col style="width: 64px;"></colgroup><tbody>
</tbody>


I'm really sorry for using the wrong function in my original post. It could have been avoided had I written in the actual values I was expecting rather than just the formula.

Something like this?

Sheet1

ABCD
1CategoryIDImpactCALC
2ACOUSTICS10.3650.978
3ACOUSTICS20.7210.978
4ACOUSTICS31.0220.978
5ACOUSTICS40.9120.978
6ACOUSTICS50.3930.978
7AGRONOMY61.2271.8462
8AGRONOMY72.0011.8462
9AGRONOMY80.9911.8462

<colgroup><col style="font-weight:bold; width:30px; "><col style="width:82px;"><col style="width:64px;"><col style="width:64px;"><col style="width:64px;"></colgroup><tbody>
</tbody>

Spreadsheet Formulas
CellFormula
D2{=PERCENTILE.INC(IF($A$2:$A$9=A2,C$2:$C$9,""),0.9)}
D3{=PERCENTILE.INC(IF($A$2:$A$9=A3,C$2:$C$9,""),0.9)}
D4{=PERCENTILE.INC(IF($A$2:$A$9=A4,C$2:$C$9,""),0.9)}
D5{=PERCENTILE.INC(IF($A$2:$A$9=A5,C$2:$C$9,""),0.9)}
D6{=PERCENTILE.INC(IF($A$2:$A$9=A6,C$2:$C$9,""),0.9)}
D7{=PERCENTILE.INC(IF($A$2:$A$9=A7,C$2:$C$9,""),0.9)}
D8{=PERCENTILE.INC(IF($A$2:$A$9=A8,C$2:$C$9,""),0.9)}
D9{=PERCENTILE.INC(IF($A$2:$A$9=A9,C$2:$C$9,""),0.9)}

<tbody>
</tbody>
Formula Array:
Produce enclosing
{ } by entering
formula with CTRL+SHIFT+ENTER!

<tbody>
</tbody>


Excel tables to the web >> Excel Jeanie HTML 4
 
Upvote 0
Aha! This formula works though!

Code:
=PERCENTRANK.INC(IF([Journal Category]=[@[Journal Category]],[Impact Factor],""),[@[Impact Factor]])

Just a slight modification from your original code. Thank you for the help, thatoneguy650!
 
Upvote 0

Forum statistics

Threads
1,220,965
Messages
6,157,120
Members
451,399
Latest member
alchavar

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