Formula that searches for item name and calculates 75th percentile of another variable?

aefitzgerald

New Member
Joined
Jan 17, 2018
Messages
8
Hello,

I am trying to pull data from another large spreadsheet (thousands of rows) which is currently sorted to look something like this;

A === B === C === D
Item === Quantity === Price === Running Total Qty.
Apple === 50 === $2.00 === 50
Apple === 100 === $2.25 === 150
Apple === 75 === $2.75 === 225
Banana === 200 === $1.75 === 200
Banana === 300 === $2.00 === 500
Orange === 100 === $0.50 === 100
Orange === 100 === $1.00 === 200
Orange === 250 === $1.25 === 250
Orange === 50 === $1.75 === 300


I am trying to come up with a formula that will allow me to quickly calculate the 75th percentile price for every item in a list, like this:


A === B
Item === 75th percentile price
Apple === $2.75
Banana === $2.00
Orange === $1.25


I am able to calculate the 75th percentile for one particular item name in the large spreadsheet by using a formula like this: LOOKUP(SUM(B2:B4)*0.75,D2:D4,C2:C4). However, I am not sure how to search for the item name in another spreadsheet AND calculate the 75th percentile. How can I quickly perform this calculation for several items at once?
 

Some videos you may like

Excel Facts

Formula for Yesterday
Name Manager, New Name. Yesterday =TODAY()-1. OK. Then, use =YESTERDAY in any cell. Tomorrow could be =TODAY()+1.

DRSteele

Well-known Member
Joined
Mar 31, 2015
Messages
2,330
Office Version
  1. 365
Platform
  1. Windows
Welcome to the forum.

I messed around with the native functions and another. They all give different results, but maybe it will work better on a larger set of data.

ABCDE
1Item Quantity Price Running Total Qty.
2Apple 50$2.0050
3Apple 100$2.25150
4Apple 75$2.75225
5Banana 200$1.75200
6Banana 300$2.00500
7Orange 100$0.50100
8Orange 100$1.00200
9Orange 250$1.25250
10Orange 50$1.75300
11
1275%
13percentilepercentile.incpercentile.excother
14Apple 2.5002.5002.7502.500
15Banana 1.9381.938#NUM!1.938
16Orange 1.3751.3751.6251.375

<colgroup><col style="width: 25pxpx"><col><col><col><col><col></colgroup><thead>
</thead><tbody>
</tbody>
Sheet1

Array Formulas
CellFormula
B14{=PERCENTILE(IF($A$2:$A$10=A14,$C$2:$C$10,""),$B$12)}
C14{=PERCENTILE.INC(IF($A$2:$A$10=A14,$C$2:$C$10,""),$B$12)}
D14{=PERCENTILE.EXC(IF($A$2:$A$10=A14,$C$2:$C$10,""),$B$12)}
E14{=PERCENTILE(IFERROR($C$2:$C$10/($A$2:$A$10=A14),""),$B$12)}

<thead>
</thead><tbody>
</tbody>
Entered with Ctrl+Shift+Enter. If entered correctly, Excel will surround with curly braces {}.
Note: Do not try and enter the {} manually yourself

<tbody>
</tbody>
 

aefitzgerald

New Member
Joined
Jan 17, 2018
Messages
8
Thanks for the welcome!

Unfortunately, I think there may be a misunderstanding because those formulas are working but they are not taking quantity into account. I should have made that more clear - my apologies - I want a formula that will go in and find all the data for the item and quickly determine the 75th percentile price among all the quantity sold. So for example there are 500 oranges in the spreadsheet -> so I would want to know the price of the 375th orange in ascending price order.

Any ideas?
 

Watch MrExcel Video

Forum statistics

Threads
1,122,649
Messages
5,597,368
Members
414,139
Latest member
okela0

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
Top