Conditional Percentiles

DemaBM

New Member
Joined
May 25, 2005
Messages
3
I am working with garments (shirts, pants, etc) and I need to calculate certain percentiles on the demand data for each size of the garments.

My setup is as follows:

Column A = Size
Column B = Demand

The percentile formula is straightforward: PERCENTILE (array, k)
where k=percentile (0.95, etc)

However, I only want the percentile of the Demand values for size 2, 4, 6, 8, etc. Ideally, it would work like the SUMIF function:

PERCENTILEIF(Range, Criteria , PercRange)

I really need this help because Access is a monster to even calculate a simple percentile!

Thanks!
 

Excel Facts

Back into an answer in Excel
Use Data, What-If Analysis, Goal Seek to find the correct input cell value to reach a desired result
Try the following

=Percentile(If(SizeRange=2,DemandRange,""),k)

confirmed with control + shift + enter
 
Upvote 0
Thanks + Followup Question

When you say "Confirm With", is it possible to drag the formula?

The formula worked for the first entry in the table, but when I dragged it, I got all zeros. If I need to go in and followup with Ctrl-Shift-Enter, that is fine, but if there is an easier way to do this for all the cells at once, that would be great!

Thanks again!
 
Upvote 0
Make sure you are using absolute reference, and not relative.

use: $A$1:$A$10

not: A1:A10

Then it should still work.

(and yes you can drag the formula)
 
Upvote 0

Forum statistics

Threads
1,214,793
Messages
6,121,619
Members
449,039
Latest member
Mbone Mathonsi

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