ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   How do I sort alphabetically by last letter in Excel? (https://www.excelbanter.com/excel-discussion-misc-queries/37259-how-do-i-sort-alphabetically-last-letter-excel.html)

andrewcodd

How do I sort alphabetically by last letter in Excel?
 
I have a pile of email addresses and i would like to go through them ordered
by company to see how many we have from each company and see who we have of
interest in our list? the list is ordered alphabetically and i would like it
remain ordered alphabetically but in the style of a rhyming dictionary ie
last letter given highest priority and the first letter the lowest. I am
suprised i couldnt find the answer in help because this is normally used for
lists of dates. ie put the year first, month second and day last then you
have from the date a numeric sequence corresponding to chronological order.
in summary i would like the list ordered alphabetically as if it were a
mirror image of itself. i use excel 2003. many thanks

Bob Phillips

You would need to write a UDF that extracts that cell, or that part of the
cell, that you want, reverse the text and return that reversed value into a
helper column. Then sort on that helper column.

Are you saying that if the email address is



it should revert to

moc.erehwemos@:em

?

--
HTH

Bob Phillips

"andrewcodd" wrote in message
...
I have a pile of email addresses and i would like to go through them

ordered
by company to see how many we have from each company and see who we have

of
interest in our list? the list is ordered alphabetically and i would like

it
remain ordered alphabetically but in the style of a rhyming dictionary ie
last letter given highest priority and the first letter the lowest. I am
suprised i couldnt find the answer in help because this is normally used

for
lists of dates. ie put the year first, month second and day last then you
have from the date a numeric sequence corresponding to chronological

order.
in summary i would like the list ordered alphabetically as if it were a
mirror image of itself. i use excel 2003. many thanks




Niek Otten

Easiest to introduce a helper column in which you put the reversed text, and
then sort both columns, using the helper column as sort key.

For the helper column:

Open the VB Editor (ALT+F11)
InsertModule
Paste this code in the code window:

Function Reverse(Text)
Dim i As Long
Reverse = ""
For i = Len(Text) To 1 Step -1
Reverse = Reverse + Mid(Text, i, 1)
Next
End Function

Now you can use the Reverse function in your worksheet. If A1 contains abcd,
and you put =Reverse(A1) in B1, then B1 will be dcba

--
Kind regards,

Niek Otten

Microsoft MVP - Excel

"andrewcodd" wrote in message
...
I have a pile of email addresses and i would like to go through them
ordered
by company to see how many we have from each company and see who we have
of
interest in our list? the list is ordered alphabetically and i would like
it
remain ordered alphabetically but in the style of a rhyming dictionary ie
last letter given highest priority and the first letter the lowest. I am
suprised i couldnt find the answer in help because this is normally used
for
lists of dates. ie put the year first, month second and day last then you
have from the date a numeric sequence corresponding to chronological
order.
in summary i would like the list ordered alphabetically as if it were a
mirror image of itself. i use excel 2003. many thanks




andrewcodd

many thanks. that seems like the bizz. i suppose it takes away the glory a
bit but i am so useless with computers that i cant follow through on the good
advice you have given me untill someone can help me use the function
function figuratively speaking. good advice to a bad general. luckily my
girlfriends brother is now hear to help. i live in spain and will help you
for soemthing in the future if you want. i know about music and art and also
marketing of technology. thanks again

"Niek Otten" wrote:

Easiest to introduce a helper column in which you put the reversed text, and
then sort both columns, using the helper column as sort key.

For the helper column:

Open the VB Editor (ALT+F11)
InsertModule
Paste this code in the code window:

Function Reverse(Text)
Dim i As Long
Reverse = ""
For i = Len(Text) To 1 Step -1
Reverse = Reverse + Mid(Text, i, 1)
Next
End Function

Now you can use the Reverse function in your worksheet. If A1 contains abcd,
and you put =Reverse(A1) in B1, then B1 will be dcba

--
Kind regards,

Niek Otten

Microsoft MVP - Excel

"andrewcodd" wrote in message
...
I have a pile of email addresses and i would like to go through them
ordered
by company to see how many we have from each company and see who we have
of
interest in our list? the list is ordered alphabetically and i would like
it
remain ordered alphabetically but in the style of a rhyming dictionary ie
last letter given highest priority and the first letter the lowest. I am
suprised i couldnt find the answer in help because this is normally used
for
lists of dates. ie put the year first, month second and day last then you
have from the date a numeric sequence corresponding to chronological
order.
in summary i would like the list ordered alphabetically as if it were a
mirror image of itself. i use excel 2003. many thanks






All times are GMT +1. The time now is 06:22 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com