A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Excel » General Discussion
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Extract Surname from text



 
 
Thread Tools Display Modes
  #1  
Old November 13th, 2009, 02:42 PM posted to microsoft.public.excel.misc
nc
external usenet poster
 
Posts: 120
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  
Old November 13th, 2009, 02:53 PM posted to microsoft.public.excel.misc
Gary''s Student
external usenet poster
 
Posts: 7,584
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  
Old November 13th, 2009, 02:54 PM posted to microsoft.public.excel.misc
Mike H
external usenet poster
 
Posts: 8,419
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.


 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


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


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