Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
nc nc is offline
external usenet poster
 
Posts: 119
Default Extract Surname from text

Can you help me write a formula to extract the surname for a text.

For example,


Text

1. Peter V Crazy
2. James Van-Cleef
3. N N M B Chan

Results

1. Crazy
2. Van-Cleef
3. Chan

Thanks.


  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,058
Default Extract Surname from text

=MID(A1,FIND("~",SUBSTITUTE(A1," ","~",LEN(A1)-LEN(SUBSTITUTE(A1,"
",""))))+1,9999)
--
Gary''s Student - gsnu200908


"nc" wrote:

Can you help me write a formula to extract the surname for a text.

For example,


Text

1. Peter V Crazy
2. James Van-Cleef
3. N N M B Chan

Results

1. Crazy
2. Van-Cleef
3. Chan

Thanks.


  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,501
Default Extract Surname from text

Hi,

=TRIM(RIGHT(SUBSTITUTE(A1," ",REPT(" ",LEN(A1))),LEN(A1)))

Mike

"nc" wrote:

Can you help me write a formula to extract the surname for a text.

For example,


Text

1. Peter V Crazy
2. James Van-Cleef
3. N N M B Chan

Results

1. Crazy
2. Van-Cleef
3. Chan

Thanks.


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
Extract surname from forenames Charlotte Howard Excel Discussion (Misc queries) 7 March 20th 08 05:07 PM
Extract given and surname a string Bob Maloney Excel Worksheet Functions 3 April 29th 07 03:27 AM
How do I combine two columns of text to 1 as in 1st name surname McGreal55 Excel Discussion (Misc queries) 2 May 19th 06 12:18 PM
Display only surname Pat Excel Worksheet Functions 2 June 23rd 05 10:30 PM
Extracting Surname from within a text string Iainkerr01 Excel Worksheet Functions 6 March 14th 05 10:16 AM


All times are GMT +1. The time now is 02:30 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"