Spreadsheet sort by last letter?
November 21, 2006 7:11 AM
Subscribe
Is it possible to sort a spreadsheet alphabetically by last letter or by retrograde spelling? Excel, StatView, etc.?
I need to preserve the relationships between 2 columns, but I need to sort by last letter. Are there any other solutions out there?
posted by imposster to computers & internet (6 comments total)
4 users marked this as a favorite
You have two columns A1 and B1. You want to sort by the last letter in A1
Strip out the last letter in each cell, in the column you want to sort by. How you do this is, get the LEN of the cell.
=LEN(A1)
this value goes in Column C
then use the MID function to get the last letter
MID takes three values (text, start_number, number_chars)
so you want =MID(A1,C1,1)
This will take the value in A1, start from the length of the string, and repeat only one character from it, namely the last one).
You might then need to copy the resultant column into notepad, then paste it back into column C. this way, the values will be static for the data you use. Make sure the values all line up, though.
You then highlight Column C click sort (the AZ button), it will ask you do you want to expand the selection, say yes, et voila!
posted by snailer at 7:19 AM on November 21, 2006