Home |
Search |
Today's Posts |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi Tom
Try below, please Option Explicit Function Lastname(celle) As String Dim Lastnamespace As String Lastnamespace = InStrRev(celle, " ") Lastname = Mid(celle, Lastnamespace + 1, Len(celle)) End Function Function Firstname(celle) As String Dim Lastnamespace As String Lastnamespace = InStrRev(celle, " ") Firstname = Mid(celle, 1, Lastnamespace - 1) End Function -- Best regards Joergen Bondesen "Tom G." wrote in message ... I have a column with a variety of first and last name variations: Joe Smith Joe John Jones Tom Jack Stuart Apple Maria Lois Lane Johann Sebastian Bach I need to be able to sort them on their last name. Note that there is no comma separating their names and that there can be any number of names, HOWEVER, the last name always appears LAST. Probably, in order to make some sort of order out of this mess, it would be best if I create two separate columns: first names, last name. Any help will be appreciated. -- cheers, Tom G |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Separating names | Excel Discussion (Misc queries) | |||
separating first and last names | Excel Discussion (Misc queries) | |||
separating names | Excel Worksheet Functions | |||
Separating names | Excel Worksheet Functions | |||
Separating first and last names | Excel Programming |