Formula for percentile if data are in multiple columns

smide

Board Regular
Joined
Dec 20, 2015
Messages
164
Office Version
  1. 2016
Platform
  1. Windows
Hello.

In columns A and B (A2:A600 and B2:B600) I have product names and in columns C and D their prices. When product is in column A his price is in column C (same row) and when product is in column B his price is in column D.

Note that the same item will not appear in both columns A & B on the same row and likewise prices for some products could be undefined (aka. blank cells) and in that case rows should be ignored for calculation.

I need a formula for 0.3 percentile for each product.

example.

A​
B​
C​
D​
E​
F​
G​
1​
product list
results
2​
apple
3
apple
2.8​
3​
apple
orange
4.9​
4​
orange
5​
orange
4
6​
orange
apple
6
1
7​
apple
orange
8
5
8​
orange
9
9​
apple
7

explanation.

All prices for apple: 3,1,8,7 and 0.3 percentile is 2.8 (cell F2)
All prices for orange: 4,6,5,9 and 0.3 percentile is 4.9 (cell F3)

*note that rows three and four are without price, and they should be disregard for calculation
 
Last edited:

Excel Facts

Get help while writing formula
Click the italics "fx" icon to the left of the formula bar to open the Functions Arguments dialog. Help is displayed for each argument.
I made a mistake with the table, so here is a picture with the correct data.
 

Attachments

  • Screenshot_1.png
    Screenshot_1.png
    16.5 KB · Views: 6
Upvote 0
Hello, would this work:

Excel Formula:
=AGGREGATE(16,6,$C$2:$D$600/(($A$2:$B$600=$E2)*($C$2:$D$600<>"")),0.3)
 
Upvote 0
Solution

Forum statistics

Threads
1,223,884
Messages
6,175,173
Members
452,615
Latest member
bogeys2birdies

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