SOLVED

Excel custom aphlabetical sort not working properly

Copper Contributor

I'm trying to sort a big list of names first by last name,  then by first name.  I'm finding that some of the sort is not accurate. I colored the cells only for easier viewing of the inaccurate sort. I have tried over and over, and different ways.  I need some help! 

20230322_111445.jpg

11 Replies

There may be leading or trailing spaces in the First Name and/or Last Name columns.

  • @Patrick2788 we checked for spaces & made sure nothing was "hidden"

@nicole82 

Check again with LEN().

 

Hello

 

If last name is in column A 

In an empty cell put this formula

=A173  = A174   (compare the yellow cells to the white)

 

The result must be true

 

 

 

 

 

 

 

@nicole82 

It comes back as false.
I've never used LEN() Can you explain more?

So it's not the same text !

 

I think there a space after the text

Check the 2 cells

 

2023-03-22 21_31_29-Greenshot image editor.png

 

@nicole82 

best response confirmed by nicole82 (Copper Contributor)
Solution

@nicole82 

The attached workbook is a re-creation of the sort issue you have in your workbook. There's also a LEN example.

Okay, thanks that worked great!
You're welcome! Glad it's working.
1 best response

Accepted Solutions
best response confirmed by nicole82 (Copper Contributor)
Solution

@nicole82 

The attached workbook is a re-creation of the sort issue you have in your workbook. There's also a LEN example.

View solution in original post