Ranking from Highest to Lowest

flexinau

Board Regular
Joined
Sep 22, 2002
Messages
122
Hi all,

Hope all of you are having a great day/night.

Trying to rank a listing from highest to lowest.

I am having issues with the items with zero values as there are more than one zeroes.

I need the final list to go from highest to lowest and list the items with zeroes last.

Must go from.......
Item A 8
Item B 1
Item C 5
Item D 4
Item E 0
Item F 0

....... to become like this
Item A 8
Item C 5
Item D 4
Item B 1
Item E 0
Item F 0

I still want to see Item E and Item F

I use Large function but it cannot handle the last two items with zeroes...

Has anyone worked out a solution for this?

Thanks
 

Excel Facts

VLOOKUP to Left?
Use =VLOOKUP(A2,CHOOSE({1,2},$Z$1:$Z$99,$Y$1:$Y$99),2,False) to lookup Y values to left of Z values.
Excel Workbook
ABC
1Item A 881
2Item B 114
3Item C 552
4Item D 443
5Item E 005
6Item F 005
Sheet1
 
Upvote 0
Thanks very much Mole999

Is there any way to get the last two items with 0 value to rank as 5 & 6 instead of 5 & 5?

Reason is I want to relist the table in rank order so I need the ranking to be unique.
 
Upvote 0
there are posts about that explain methods, I wouldn't use them as they are identical, and therefore equal, For your needs you'd only need to sort the values, highest to lowest, then add an expanding list of numbers to drag down 1 onwards
 
Upvote 0
Hi,

You can try this

C2 =LARGE($B$2:$B$7,ROW(A1))
D2 =IFERROR(INDEX($A$2:$A$7,SMALL(IF($B$2:$B$7=C2,IF(COUNTIF($D$1:D1,$A$2:$A$7)=0,ROW($A$2:$A$7)-ROW($A$2)+1)),1)),"")

D2 It's an array formula so Control+Shift+Enter not just Enter

Before A1Before B1After C1After D1
Item A88Item A
Item B15Item C
Item C54Item D
Item D41Item B
Item E00Item E
Item F00Item F

<tbody>
</tbody>
 
Last edited:
Upvote 0
ITEMVALUEITEMVALUE
Item A8Item A8
Item B1Item C5
Item C5Item D4
Item D4Item B1
Item E0Item E0
Item F0Item F0

<tbody>
</tbody>

In D2 control+shift+enter, not just enter, and copy down:

=IF($E2="","",INDEX($A$2:$A$7,SMALL(IF($B$2:$B$7=$E2,ROW($A$2:$A$7)-ROW($A$2)+1),COUNTIFS($E$2:E2,E2))))

In E2 just enter and copy down:

IF(ROWS($E$2:E2)>ROWS($A$2:$B$7),"",LARGE($B$2:$B$7,ROWS($E$2:E2)))
 
Upvote 0
Thanks mole999...
Thanks for your persistence admiral100 & Aladin Akyurek...this has provided me with a solution...
 
Upvote 0

Forum statistics

Threads
1,214,976
Messages
6,122,541
Members
449,089
Latest member
davidcom

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