Calculating ranks based on a list of numbers

elsenorjose

New Member
Joined
Feb 27, 2004
Messages
1
I have a list of numbers (unit production per sales person) and I want to identify which sales people fall in the top 33%, the middle 33%, and the bottom 33%. Given this example:

Rep A - 10 units
Rep B - 10 units
Rep C - 15 units
Rep D - 18 units
Rep E - 20 units
Rep F - 23 unites

I can identify that Reps A and B are in the bottom 3rd, Reps C and D are in the middle 3rd, and Reps E and F are in the top 3rd.

Of course my list is not so simple. I have tried the rank and percentile tool in the analysis toolpak and it's not quite what I need. I have also created a formula which calculates the median average and then based on that average gives me values above or below the median but this doesn't quite work because given value X as my median, x-1 goes to the low range and x+1 goes into the high range but of course that wouldn't be true because in real life, one unit in either direction won't affect your score that much.

Has anyone solved a similar problem?
 
Aladin Akyurek said:
...
A2:

=COUNT(B5:B10)

Counts the data points we deal with.

C5, which is copied down:

=RANK(B5,$B$5:$B$10)+COUNTIF($B$5:B5,B5)-1

Ranks units produced.

D1:D2 must house 0's.

E1:

=MAX(IF(INDEX($B$5:$B$10,MATCH(E2,$C$5:$C$10,0))=$B$5:$B$10,$C$5:$C$10))-E2

which must be confirmed with control+shift+enter instead of just with enter.

This formula is copied across to G1.

E2:

=ROUNDUP(($A$2*33%),0)+D2

which is copied across to G2.

E4:

="Top "&E2

which is copied to G4.

E5:

=IF(ROW()-ROW(E$5)+1+D$1+D$2<=E$2+E$1,INDEX($A$5:$A$10,MATCH(ROW()-ROW(E$5)+1+D$1+D$2,$C$5:$C$10,0)),"")

which is copied to G5 then down.

Try the following...

1] Change D's units from 18 to 20 & observe the results.

2] Change also B's units from 10 to 15 & observe the results.

The formula in E2 should be copied to F2, not to G2.

In G2 should be entered:

=MIN(A2,ROUNDUP(($A$2*33%),0)+F2)
 
Upvote 0

Excel Facts

Does the VLOOKUP table have to be sorted?
No! when you are using an exact match, the VLOOKUP table can be in any order. Best-selling items at the top is actually the best.
Yogi Anand said:
What do you think? Are the results not right? I would not be surprised if they do not pass every test . However, in this case if they are not, what do you think they should be?

Just build the system I proposed and see how it behaves with test cases.
 
Upvote 0
Aladin Akyurek said:
Yogi Anand said:
What do you think? Are the results not right? I would not be surprised if they do not pass every test . However, in this case if they are not, what do you think they should be?

Just build the system I proposed and see how it behaves with test cases.
Hi Aladin:

I am assuming you mean with the following test case ...

{"Rep","Units";"A",10;"B",20;"C",20;"D",20;"E",23;"F",23;"G",40;"H",60}

Here is my solution using this test data for Top8, Top6,Top4, and Top2 ...
y040227h1a.xls
ABCDEF
1TopHowManyRanksNumberOfRecordsNoOfRecords
2inTopHowMany
3482
4IntermediaryColumns
5REPSALESRANKUniqueRankSequentialRankTopHowMany
6RepA10885Top6
7RepB20554Top4
8RepC205 4Top4
9RepD205 4Top4
10RepE23333Top4
11RepF233 3Top4
12RepG40222Top2
13RepH60111Top2
Sheet4 (6)


Thanks for your review and your comments!
 
Upvote 0
Pivot Tables appears to agree with my formula system...

Sample data:

{"Rep","Units";"A",10;"B",12;"C",20;"D",20;"E",23;"F",23;"G",40;"H",60}

First 3rd via Pivot Tables...

Show: Top 3
ranking elsenorjose X.xls
ABCD
2
3SumofUnits
4RepTotal
5E23
6F23
7G40
8H60
9GrandTotal146
PT


Show: Top 6 (adds appropriate items that fall in the 2nd third)

Addition tan colored...
ranking elsenorjose X.xls
ABCD
2
3SumofUnits
4RepTotal
5C20
6D20
7E23
8F23
9G40
10H60
11GrandTotal186
12
PT


Show all/top 8 (adds appropriate items that fall in the 3rd third)

Addition light green colored...
ranking elsenorjose X.xls
ABCD
2
3SumofUnits
4RepTotal
5A10
6B12
7C20
8D20
9E23
10F23
11G40
12H60
13GrandTotal208
PT


And...
 
Upvote 0

Forum statistics

Threads
1,214,979
Messages
6,122,561
Members
449,089
Latest member
Motoracer88

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