Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 65
Default Formula help...right/find command

In cell N92 there is a name (Cliff Lee). I would like a formula in cell Z92
to get the last name (Lee) from cell N92. I have more names in column N that
I want to do the same thing to. What formula should I use? I am trying to
use the right and find commands but I cant get it to work. Thanks.
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 4,339
Default Formula help...right/find command

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

BUT only there are two names: Cliff M Lee will return "M Lee"

"Jambruins" wrote:

In cell N92 there is a name (Cliff Lee). I would like a formula in cell Z92
to get the last name (Lee) from cell N92. I have more names in column N that
I want to do the same thing to. What formula should I use? I am trying to
use the right and find commands but I cant get it to work. Thanks.

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 65
Default Formula help...right/find command

thanks.

"Toppers" wrote:

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

BUT only there are two names: Cliff M Lee will return "M Lee"

"Jambruins" wrote:

In cell N92 there is a name (Cliff Lee). I would like a formula in cell Z92
to get the last name (Lee) from cell N92. I have more names in column N that
I want to do the same thing to. What formula should I use? I am trying to
use the right and find commands but I cant get it to work. Thanks.

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,501
Default Formula help...right/find command

This extract the lat name even if there is a middle name or initial.

=MID(A1,FIND("^^",SUBSTITUTE(" "&A1," ","^^",LEN(" "&A1)-LEN(SUBSTITUTE("
"&A1," ","")))),999)

It falls over if the last name has more than 999 leter3 in it :)

Mike

"Jambruins" wrote:

In cell N92 there is a name (Cliff Lee). I would like a formula in cell Z92
to get the last name (Lee) from cell N92. I have more names in column N that
I want to do the same thing to. What formula should I use? I am trying to
use the right and find commands but I cant get it to work. Thanks.

  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,202
Default Formula help...right/find command

This extract the lat name even if there is a middle name or initial.

But, of course, it will not solve the problem of someone having a two-part
name. I have a friend whose name is Frank Della Rossa... Della Rossa is his
last name. By the way, I am not faulting your formula at all (I've post a
similar one in the past to slice off the last word in a list), there is no
single "rule" that can be applied to names that will work in all
situations... it is just the nature of names.

Rick



  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,202
Default Formula help...right/find command

This extract the lat name even if there is a middle name or initial.

=MID(A1,FIND("^^",SUBSTITUTE(" "&A1," ","^^",LEN(" "&A1)-LEN(SUBSTITUTE("
"&A1," ","")))),999)


Might I suggest this slight modification to make the Formula survive
trailing blanks...

=MID(TRIM(A1),FIND("^^",SUBSTITUTE(" "&TRIM(A1)," ","^^",LEN("
"&TRIM(A1))-LEN(SUBSTITUTE(""&TRIM(A1)," ","")))),999)

Rick

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
FIND command Paul Blarmy Excel Discussion (Misc queries) 5 January 6th 07 12:30 PM
The edit - find command fin_model Excel Worksheet Functions 3 May 29th 06 07:00 PM
Find Command Button NeedMorHP Excel Discussion (Misc queries) 1 June 6th 05 07:48 PM
Advanced Find Command?? Debbie Excel Discussion (Misc queries) 1 February 4th 05 09:07 PM
Excel has a "Find Next" command but no "Find Previous" command. Michael Fitzpatrick Excel Discussion (Misc queries) 2 January 10th 05 11:45 PM


All times are GMT +1. The time now is 06:51 AM.

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

About Us

"It's about Microsoft Excel"