Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
How do I sort by location within a cell in Excel?
I am trying to sort a list alphabetically but position within a cell. For
example, my cells contain: John Smith, Will Jones, Gary Roberts. I want to sort by the last item in the cell. Thanks |
#2
Posted to microsoft.public.excel.misc
|
|||
|
|||
How do I sort by location within a cell in Excel?
Something like this to create a column you can sort by.
Sub sortbylast() For Each c In Range("f2:f7") c.Offset(, 1) = Right(c, Len(c) - InStrRev(c, " ")) Next End Sub -- Don Guillett Microsoft MVP Excel SalesAid Software "Leigh" wrote in message ... I am trying to sort a list alphabetically but position within a cell. For example, my cells contain: John Smith, Will Jones, Gary Roberts. I want to sort by the last item in the cell. Thanks |
#3
Posted to microsoft.public.excel.misc
|
|||
|
|||
How do I sort by location within a cell in Excel?
You would need a help column with the last names, then sort on the help
column. =MID(A1,FIND("^^",SUBSTITUTE(A1," ","^^",LEN(A1)-LEN(SUBSTITUTE(A1," ",""))))+1,255) copy down in a help column will give you the last names unless they use things like JR etc then you can sort on that help column -- Regards, Peo Sjoblom "Leigh" wrote in message ... I am trying to sort a list alphabetically but position within a cell. For example, my cells contain: John Smith, Will Jones, Gary Roberts. I want to sort by the last item in the cell. Thanks |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Excel: Use pic location string to call up picuture in cell? | Excel Discussion (Misc queries) | |||
Sort by Location | Excel Worksheet Functions | |||
hyperlink an excel cell to a specific location wthin application f | New Users to Excel | |||
hyperlink an excel cell to a specific location wthin application f | Excel Discussion (Misc queries) | |||
Excel Sort function should not sort the cell formatting! | Excel Worksheet Functions |