Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
WDP WDP is offline
external usenet poster
 
Posts: 6
Default Pull Out Last Name

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
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,688
Default Pull Out Last Name

One way:

=TRIM(MID(A1,FIND(" ",A1&" "),255))

Biff

"WDP" wrote in message
...
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



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 459
Default Pull Out Last Name

WDP wrote:
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


  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 5,651
Default Pull Out Last Name

On Thu, 24 Aug 2006 18:17:01 -0700, WDP wrote:

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
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
hyper links in pull down menus Wayne Knazek Excel Discussion (Misc queries) 2 June 26th 06 02:43 PM
Personal macro file will not pull up when excel is started Tigger Setting up and Configuration of Excel 0 April 28th 06 08:48 PM
Referencing multiple criteria to pull data doug1 Excel Discussion (Misc queries) 3 March 14th 06 09:30 PM
Not all data in AutoFilter pull down sacwia01 Excel Worksheet Functions 2 October 6th 05 06:34 PM
Why does AutoFilter not show all the data in the pull down? sacwia01 Excel Discussion (Misc queries) 3 October 4th 05 07:41 PM


All times are GMT +1. The time now is 09:54 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"