View Single Post
  #3   Report Post  
Ron Rosenfeld
 
Posts: n/a
Default

On Thu, 24 Mar 2005 07:13:04 -0800, "Pat Mayton" <Pat
wrote:

I know how to use =RIGHT to separate the last name when there are only 1st
and last name. How do I separate the last name when there are 3 or more
words in the name? EX: Linda Jane Ellen Doe or Mrs. Linda Ellen Doe I have
a column of names for an address list but the entire name was keyed into each
cell in column A (Mr. & Mrs. John H. Doe). I want to separate the last name
so that I can sort the list of names in alphabetical order.



=IF(COUNTIF(A1,"* *")=0,A1,MID(SUBSTITUTE(A1," ",CHAR(1),LEN(A1)-
LEN(SUBSTITUTE(A1," ",""))),1+FIND(CHAR(1),SUBSTITUTE(
A1," ",CHAR(1),LEN(A1)-LEN(SUBSTITUTE(A1," ","")))),255))


--ron