rank for non-numeric, needed for sorting names

Neomatrix

New Member
Joined
Feb 3, 2021
Messages
25
Office Version
  1. 365
  2. 2019
  3. 2016
Platform
  1. Windows
  2. Mobile
Hi,
I am trying to get ranking for non-numerics to show position for A-Z ranking, countif is not working if I have two of the same or more, and it is not working if I have blank cells below as well. I need this for sorting in another table to get A-Z sorted names.
Final result should be like this in A column to mark position on ranking:
1733264213757.png
 

Attachments

  • 1733263966016.png
    1733263966016.png
    16.1 KB · Views: 3

Excel Facts

Excel motto
Not everything I do at work revolves around Excel. Only the fun parts.
Try the following formula, which will work in all versions of Excel...

A3, confirmed with CONTROL+SHIFT+ENTER, and copied down:

=SUM(IF($B$3:$B$12<B3,1))+COUNTIF($B$3:$B3,B3)

Book1
ABCDE
1
2RankNames
36HORATIUS
4124 HORAS
59NIKE
62A23 DILL
710ZEBAR
85GHUTT
98MARJORIE
107KUBEN
113ADOLF
124ADOLF
13
14
15
Sheet1
Cell Formulas
RangeFormula
A3:A12A3=SUM(IF($B$3:$B$12<B3,1))+COUNTIF($B$3:$B3,B3)
Press CTRL+SHIFT+ENTER to enter array formulas.


Hope this helps!
 
Upvote 0
Book1
ABCDE
1NameRankNumeric Rank
2Boris9Akbar99
3Sam2Bob22
4Bob22Boris9
5Sam1Josh12
6Jude50Jude50
7Akbar99Julie98
8Julie98Sam1
9Josh12Sam2
Sheet1
Cell Formulas
RangeFormula
D2:E9D2=SORT(SORTBY(A2:B9,B2:B9))
Dynamic array formulas.
 
Upvote 0
Another option, for 365 or for other versions.
Book1
ABCD
1
2365Other versions
36Horatius6
4124 Horas1
59Nike9
62A23 Dill2
710Zebar10
85Ghutt5
98Marjorie8
107Kuben7
113Adolf3
124Adolf4
131111
141212
151313
Sheet1
Cell Formulas
RangeFormula
A3:A15A3=LET(_a,COUNTIF($B$3:$B$13,"<"&B3)+(COUNT($B$3:$B$13)*ISTEXT(B3))+COUNTIF($B$3:B3,B3),IF(_a=0,_a+ROW()-2,_a))
C3:C15C3=IF(COUNTIF($B$3:$B$13,"<"&B3)+(COUNT($B$3:$B$13)*ISTEXT(B3))+COUNTIF($B$3:B3,B3)=0,COUNTIF($B$3:$B$13,"<"&B3)+(COUNT($B$3:$B$13)*ISTEXT(B3))+COUNTIF($B$3:B3,B3)+ROW()-2,COUNTIF($B$3:$B$13,"<"&B3)+(COUNT($B$3:$B$13)*ISTEXT(B3))+COUNTIF($B$3:B3,B3))
 
Upvote 0
Solution
Another 2021 or later option:
Book3
AB
1
2365
36Horatius
4124 Horas
59Nike
62A23 Dill
710Zebar
85Ghutt
98Marjorie
107Kuben
113Adolf
124Adolf
Sheet13
Cell Formulas
RangeFormula
A3:A12A3=XMATCH(B3,SORT($B$3:$B$12))+COUNTIF($B$3:B3,B3)-1
 
Upvote 0
Try the following formula, which will work in all versions of Excel...

A3, confirmed with CONTROL+SHIFT+ENTER, and copied down:

=SUM(IF($B$3:$B$12<B3,1))+COUNTIF($B$3:$B3,B3)

Book1
ABCDE
1
2RankNames
36HORATIUS
4124 HORAS
59NIKE
62A23 DILL
710ZEBAR
85GHUTT
98MARJORIE
107KUBEN
113ADOLF
124ADOLF
13
14
15
Sheet1
Cell Formulas
RangeFormula
A3:A12A3=SUM(IF($B$3:$B$12<B3,1))+COUNTIF($B$3:$B3,B3)
Press CTRL+SHIFT+ENTER to enter array formulas.


Hope thi

Try the following formula, which will work in all versions of Excel...

A3, confirmed with CONTROL+SHIFT+ENTER, and copied down:

=SUM(IF($B$3:$B$12<B3,1))+COUNTIF($B$3:$B3,B3)

Book1
ABCDE
1
2RankNames
36HORATIUS
4124 HORAS
59NIKE
62A23 DILL
710ZEBAR
85GHUTT
98MARJORIE
107KUBEN
113ADOLF
124ADOLF
13
14
15
Sheet1
Cell Formulas
RangeFormula
A3:A12A3=SUM(IF($B$3:$B$12<B3,1))+COUNTIF($B$3:$B3,B3)
Press CTRL+SHIFT+ENTER to enter array formulas.


Hope this helps!
Thanks, but it is not working on blanks
 
Upvote 0

Forum statistics

Threads
1,224,592
Messages
6,179,787
Members
452,942
Latest member
VijayNewtoExcel

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