Percentiles for two columns of data/weighted percentile?

grapeguy

New Member
Joined
Mar 11, 2015
Messages
1
Hi,
First post here. I found the board by googling various problems and this board came up a lot.

I'm using Excel 2010.
Here's my problem:

I have two sets of data. Column B is the price per ton paid for grapes in a year. Column C is the number of tons for each price paid.
For example:

B C
$1000 4000
$1200 5500
$1400 4500
$2000 3400
$3000 1000
$3001 500
$3002 400
$3003 100

I know it's no problem to us PERCENTILE for a single column, but these results would be meaningless because the 90th percentile of price doesn't reflect the market. Far more tons were bought at a lower price.

So, how do I come up with a price percentile that is weighted by tons? Does this involved SUMPRODUCT in some way or do I have to get more complicated with AGGREGATE and such?

Thanks for any help on this.
 

Excel Facts

Shade all formula cells
To shade all formula cells: Home, Find & Select, Formulas to select all formulas. Then apply a light fill color.
Hi grapeguy,

If you don't mind creating an extra column with the percentages as the below table:

$1000
40000,206186
$120055000,489691
$140045000,721649
$200034000,896907
$300010000,948454
$30015000,974227
$30024000,994845
$30031001

<tbody>
</tbody>

Now you have the percentage of tons bought per price. If you would use the following formula:
Code:
=IF(SEARCH(0,9;C5:C12)<0,9;SEARCH(0,9;C5:C12;A6:A13);SEARCH(0,9;C5:C12;A5:A12))
in a different cell, this would result in the 90th percentile, being 3000$ (90% of the tons bought are bought at 3000$ or less).

Note: my table (above) starts at A5 and ends in C12.

The formula in C5 to calculate percentages is: =SUM($B$5:B5)/SUM($B$5:$B$12)
Copy this down until C12
The 90th percentile result cell would hold the following formula (same as the first formula given, to clarify the references used in this formula:
=IF(SEARCH(0,9;C5:C12)<0,9;SEARCH(0,9;C5:C12;A6:A13);SEARCH(0,9;C5:C12;A5:A12))
 
Upvote 0

Forum statistics

Threads
1,214,879
Messages
6,122,065
Members
449,064
Latest member
scottdog129

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