Finding Percentile Rank in Excel/VBA

hcparsons12

New Member
Joined
Jul 1, 2021
Messages
10
Office Version
  1. 365
Platform
  1. Windows
I'm finding the percentile rank of different numbers in a set range, depending on user input. Just interested as to what the most accurate method is for doing so within Excel and VBA. I typically use the Rank.EQ/Count method, but I noticed that gives numbers slightly different (like 0.002 different) than PERCENTRANK.INC and PERCENTRANK.EXC. How is that possible? If I calculate manually by dividing the count of numbers beneath the selected number by the total count, I get the same number as PERCENTRANK.EXC. So my final results for a given selection based off the four methods are:

RANK.EQ/COUNT = 0.700
PERCENTRANK.INC = 0.699
PERCENTRANK.EXC = 0.698
MANUALLY = 0.698

I'd like to leave out 100th percentile, so I'm favoring PERCENTRANK.EXC. I'm just wondering what the best or most accurate method is to find percentile rank in Excel or in VBA (preferred). Want to be as accurate as possible. Thanks.
 

Excel Facts

Square and cube roots
The =SQRT(25) is a square root. For a cube root, use =125^(1/3). For a fourth root, use =625^(1/4).

Forum statistics

Threads
1,214,957
Messages
6,122,466
Members
449,086
Latest member
kwindels

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