Extracting part of a string

K

Ken Mahler

Greetings,

I have a name value in A1,eg: Mr. Joe Smith. I need a function/formula that
will find the space just before the last name -- the 1st space character
from the right -- and extract everyting to the right of it so I get just the
last name in cell A2.

TIA

Ken
 
J

Jason Morin

One way:

=MID(A1,FIND("#",SUBSTITUTE(A1," ","#",LEN(A1)-LEN
(SUBSTITUTE(A1," ",""))))+1,255)

HTH
Jason
Atlanta, GA
 
2

2rrs

Have you considered using the Data, Text to Columns command?

It worked very well on your sample.
 

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