Automatic Alphabetize by last name

Letto4135

New Member
Joined
May 25, 2017
Messages
19
Why not just use the sort function? Because I work with idiots and they'll be using this too.

Problem, I can't get blanks spaces to stop appearing and I can't differentiate between two people with the same last name. When I can, I can't tell it to then look at first name to see who goes first.

"Alphabetized"Numbers in case of 0sConverted to NumbersLast onlyFull Name
=IFERROR(VLOOKUP(1,$O$2:$T$6,4,FALSE),"")=COUNTIF($Q$2:$Q$16,"<="&Q2)-COUNTIF(P2:P5,"0")=COUNTIF($Q$2:$Q$6,"<="&Q2)=TRIM(RIGHT(SUBSTITUTE(R2," ",REPT(" ",100)),100))Tyler Bailey
=IFERROR(VLOOKUP(2,$O$1:$T$6,4,FALSE),"")=COUNTIF($Q$2:$Q$16,"<="&Q3)-COUNTIF(P3:P6,"0")=COUNTIF($Q$2:$Q$6,"<="&Q3)=TRIM(RIGHT(SUBSTITUTE(R3," ",REPT(" ",100)),100))Bill Bailey
=IFERROR(VLOOKUP(3,$O$1:$T$6,4,FALSE),"")=COUNTIF($Q$2:$Q$16,"<="&Q1)-COUNTIF(P4:P7,"0")=COUNTIF($Q$2:$Q$6,"<="&Q4)=TRIM(RIGHT(SUBSTITUTE(R4," ",REPT(" ",100)),100))Christian Tanner
=IFERROR(VLOOKUP(4,$O$1:$T$6,4,FALSE),"")=COUNTIF($Q$1:$Q$16,"<="&Q1)-COUNTIF(P5:P8,"0")=COUNTIF($Q$2:$Q$6,"<="&Q5)=TRIM(RIGHT(SUBSTITUTE(R5," ",REPT(" ",100)),100))Kyle West
=IFERROR(VLOOKUP(5,$O$1:$T$6,4,FALSE),"")=COUNTIF($Q$1:$Q$16,"<="&Q1)-COUNTIF(P6:P9,"0")=COUNTIF($Q$2:$Q$6,"<="&Q6)=TRIM(RIGHT(SUBSTITUTE(R6," ",REPT(" ",100)),100))LOL FARM

<tbody>
</tbody>


When it does countif in either line, if there are multiple same last names it skips a number and has two of the next number instead so the "alphabetized" cloumn looks like this...

Blank space
Tyler Bailey
LOL FARM
Christian Tanner
Kyle West

<tbody>
</tbody>
 

Excel Facts

Who is Mr Spreadsheet?
Author John Walkenbach was Mr Spreadsheet until his retirement in June 2019.
a1
fred green5fredgreen4740519361665b3
harry black6harryblack31671501c7
joe white4joewhite71561793445585d11
ann brown4annbrown3405279338985e19
f29
g47
h61
I79
j97
k131
501harryblackl167
338985annbrownm203
361665fredgreenn235
3445585joewhiteo279
p311
q353
r405
s467
t519
u561
v613
use search for " " to find the first name and surnamew715
x907
assign numbers to each letter of the alphabety1129
z1471
find the numbers for first 3 letters
multiply them
use small function to place numbers in order
use offset match to get the names in the bottom table

<colgroup><col><col span="16"></colgroup><tbody>
</tbody>
 
Upvote 0

Forum statistics

Threads
1,215,062
Messages
6,122,925
Members
449,094
Latest member
teemeren

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