View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Pete_UK Pete_UK is offline
external usenet poster
 
Posts: 8,856
Default Sort by Last Name when name is combined

Assuming your names are in column A, starting with A2, with a single
space between them, enter this formula in B2:

=RIGHT(A2,LEN(A2)-FIND(" ",A2))&" "&LEFT(A2,FIND(" ",A2))

this will reverse the names to give you surname first followed by
first name. If you want the names to be separated into different
columns, try this:

B2: =RIGHT(A2,LEN(A2)-FIND(" ",A2))
C2: =LEFT(A2,FIND(" ",A2))

Either way, you can then copy the formulae down for as many entries as
you have in column A.

You can then sort on column B (or B and C in the second case, so as to
distinguish between Smith David and Smith John).

Hope this helps.

Pete


On Apr 23, 5:52 pm, Lisapbs wrote:
I inherited a worksheet where first and last name are combined in one cell
(i.e. Jane Doe) The first name is listed first. Can I sort this this by the
LAST name? How? If not, how can I split the text into two cells FIRST NAME
and LAST NAME?

Thanks! Lisa