Extracting a word from text in an excel field

J

john 25454

How do I extract the last word from variable length text in an excel field?

eg Extract the family name from a full name: "Smith" from "John Edward Smith"
or "Jones" from "Albert Jones"
 
P

Peo Sjoblom

If it is always delimited by a space

=RIGHT(A1,LEN(A1)-SEARCH("^^",SUBSTITUTE(A1,"
","^^",LEN(A1)-LEN(SUBSTITUTE(A1," ","")))))


Beware if you have names like Loudon Wainwright III

those have to be handled manually
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top