Ranking in ascending order include zeros as highest rank

Celticshadow

Active Member
Joined
Aug 16, 2010
Messages
414
Office Version
  1. 365
Platform
  1. Windows
Hello Forum

It has been a while since I last posted and trust you are all well as I require your help for a formula as below.

I have ratings (Col B )associated to an ID number (Col A) and I would like a formula to rank the rating in column B in asscending order but any zero's are to be ranked highest. Hopefully the mini sheet will help to clarify, however any queries then please do not hesitate to ask further.

Regards
 

Attachments

  • Mr Excel Ranking Query.png
    Mr Excel Ranking Query.png
    9.5 KB · Views: 16

Excel Facts

Why does 9 mean SUM in SUBTOTAL?
It is because Sum is the 9th alphabetically in Average, Count, CountA, Max, Min, Product, StDev.S, StDev.P, Sum, VAR.S, VAR.P.
Try this:
Book1(AutoRecovered).xlsm
ABCD
1IDNumbersRank
2108
311.535
410.047
510.976
613.564
714.853
816.912
918.751
1027.412
11208
1223.335
1329.121
1425.674
1521.047
1626.773
1722.856
18
Sheet4
Cell Formulas
RangeFormula
C2:C17C2=COUNTIFS($B$2:$B$17,">" & B2,$A$2:$A$17,A2) +1
 
Upvote 0
Try this:
Book1(AutoRecovered).xlsm
ABCD
1IDNumbersRank
2108
311.535
410.047
510.976
613.564
714.853
816.912
918.751
1027.412
11208
1223.335
1329.121
1425.674
1521.047
1626.773
1722.856
18
Sheet4
Cell Formulas
RangeFormula
C2:C17C2=COUNTIFS($B$2:$B$17,">" & B2,$A$2:$A$17,A2) +1
Hi Maabadi

Many thanks for replying it is appreciated. However I require the rank to be ascending in order with Zero's to be classed as the largest rank as in the posted example.
Your formula as rank in descending order with Zero's ranked in the nos position instead of last/highest position.

Regards
 
Upvote 0
Sorry my misunderstanding, try formula at column D:
Book1.xlsx
ABCDE
1IDNumbersRankRank2
21088
311.5353
410.0471
510.9762
613.5644
714.8535
816.9126
918.7517
1027.4126
112088
1223.3353
1329.1217
1425.6744
1521.0471
1626.7735
1722.8562
18
Sheet1
Cell Formulas
RangeFormula
C2:C17C2=COUNTIFS($B$2:$B$17,">" & B2,$A$2:$A$17,A2) +1
D2:D17D2=IF(B2=0,COUNTIFS($A$2:$A$17,A2),COUNTIFS($B$2:$B$17,"<"&B2,$A$2:$A$17,A2))
 
Upvote 0

Forum statistics

Threads
1,214,985
Messages
6,122,606
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