Percentile with two columns

Charlotte231

New Member
Joined
May 19, 2017
Messages
2
Hello, I am looking for a formula that gives me a threshold/score value from column A up to which the revenue in column B cumulates to 10%. The scores need to be in descending order, i.e. 10 is best and 1 worst. Plus, the data cannot/should not be sorted (otherwise one could use index & match). I have tried the percentile.inc function but that was unsuccessful. Example table attached.

The formula should give me 7, because the revenue of the best scores 9.8, 8, and 7 make up 10% of the toal revenue.

Any help is appreciated.

[TABLE="class: grid, width: 500"]
<tbody>[TR]
[TD]A Score
[/TD]
[TD]B Revenue
[/TD]
[/TR]
[TR]
[TD]8
[/TD]
[TD]3
[/TD]
[/TR]
[TR]
[TD]7
[/TD]
[TD]2
[/TD]
[/TR]
[TR]
[TD]7
[/TD]
[TD]5
[/TD]
[/TR]
[TR]
[TD]6
[/TD]
[TD]1
[/TD]
[/TR]
[TR]
[TD]6
[/TD]
[TD]3
[/TD]
[/TR]
[TR]
[TD]5
[/TD]
[TD]50
[/TD]
[/TR]
[TR]
[TD]3
[/TD]
[TD]20
[/TD]
[/TR]
[TR]
[TD]2
[/TD]
[TD]5
[/TD]
[/TR]
[TR]
[TD]1
[/TD]
[TD]6
[/TD]
[/TR]
[TR]
[TD]9.8
[/TD]
[TD]5
[/TD]
[/TR]
</tbody>[/TABLE]
 

Excel Facts

Bring active cell back into view
Start at A1 and select to A9999 while writing a formula, you can't see A1 anymore. Press Ctrl+Backspace to bring active cell into view.
Hi Charlotte,

If you have your data in columns A and B, use the following array formula in some other column:

=MAX(IF(MIN(IF(SUMIF($A:$A,">="&$A:$A,$B:$B)/SUM($B:$B)<0.1,1,SUMIF($A:$A,">="&$A:$A,$B:$B)/SUM($B:$B)))=SUMIF($A:$A,">="&$A:$A,$B:$B)/SUM($B:$B),$A:$A,0))

Make sure that you press Ctrl+Shift+Enter once you enter it. Let me know if it works for you.
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,181
Members
453,022
Latest member
Mohamed Magdi Tawfiq Emam

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