Pull Out Last Name

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi:

I am looking for a function in Excel to extract the LAST NAME from a cell
that looks like:

Justin Kenney

I want the formula to give me only the last name (ie Kenney)

Can anyone help with a formual (maybe the RIGHT function) that looks RIGHT
TO LEFT for the 1st space...and then gives me everything to the RIGHT of the
space

Thanks
Warren
 
WDP said:
Hi:

I am looking for a function in Excel to extract the LAST NAME from a
cell that looks like:

Justin Kenney

I want the formula to give me only the last name (ie Kenney)

Can anyone help with a formual (maybe the RIGHT function) that looks
RIGHT TO LEFT for the 1st space...and then gives me everything to the
RIGHT of the space

Thanks
Warren


Hi Warren,

I think you can use this formula:

=RIGHT(A1,LEN(A1)-FIND("[",SUBSTITUTE(A1," ","[",LEN(A1)-LEN(SUBSTITUTE(A1,"
","")))))

that take in account the possibility to have more than one space per cell.
If you are sure that there is just one space per cell you can use this one:

=RIGHT(A1,LEN(A1)-FIND(" ",A1))


--
Hope I helped you.

Thanks in advance for your feedback.

Ciao

Franz Verga from Italy
 
Hi:

I am looking for a function in Excel to extract the LAST NAME from a cell
that looks like:

Justin Kenney

I want the formula to give me only the last name (ie Kenney)

Can anyone help with a formual (maybe the RIGHT function) that looks RIGHT
TO LEFT for the 1st space...and then gives me everything to the RIGHT of the
space

Thanks
Warren

This formula will pull out everything after the last space in the string:

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

If there might be a trailing <space> in the string, then use:

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


--ron
 

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

Similar Threads

Extract within a cell 3
Function similar to "LEFT" 3
Extract From Cell 4
Excel help separating / 2
Help needed 0
Extracting part of a string 2
Help extracting part of a string 6
Pulling only first name 3

Back
Top