Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 6
Default Split surname from end of name data

Hi all

I've seen lots of posts about how to split up name data when there are a
known number of names within the cell or when the surname is the first item
in the cell.

Can someone please tell me how to split out the surname when I have data
such as "Dr Andrew Frederick Smith" and "Dr Jane Jones" i.e. the number of
names, initials, whatever is variable - therefore I need to find the space by
starting at the right hand end instead of the left ?

Any assistance would be much appreciated.
Hinemoa
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,440
Default Split surname from end of name data

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

--
Kind regards,

Niek Otten
Microsoft MVP - Excel

"Serena" wrote in message ...
| Hi all
|
| I've seen lots of posts about how to split up name data when there are a
| known number of names within the cell or when the surname is the first item
| in the cell.
|
| Can someone please tell me how to split out the surname when I have data
| such as "Dr Andrew Frederick Smith" and "Dr Jane Jones" i.e. the number of
| names, initials, whatever is variable - therefore I need to find the space by
| starting at the right hand end instead of the left ?
|
| Any assistance would be much appreciated.
| Hinemoa


  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,268
Default Split surname from end of name data

One way

=MID(A1,FIND("^^",SUBSTITUTE(A1," ","^^",LEN(A1)-LEN(SUBSTITUTE(A1,"
",""))))+1,1024)


will return the last word/string separated by a space, make sure there are
no trailing spaces or else you will get a blank cell

=MID(TRIM(A1),FIND("^^",SUBSTITUTE(TRIM(A1),"
","^^",LEN(TRIM(A1))-LEN(SUBSTITUTE(TRIM(A1)," ",""))))+1,1024)

will take care of trailing spaces



--


Regards,


Peo Sjoblom


"Serena" wrote in message
...
Hi all

I've seen lots of posts about how to split up name data when there are a
known number of names within the cell or when the surname is the first
item
in the cell.

Can someone please tell me how to split out the surname when I have data
such as "Dr Andrew Frederick Smith" and "Dr Jane Jones" i.e. the number of
names, initials, whatever is variable - therefore I need to find the space
by
starting at the right hand end instead of the left ?

Any assistance would be much appreciated.
Hinemoa



  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 6
Default Split surname from end of name data

Many thanks for your help.
Serena

"Niek Otten" wrote:

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

--
Kind regards,

Niek Otten
Microsoft MVP - Excel

"Serena" wrote in message ...
| Hi all
|
| I've seen lots of posts about how to split up name data when there are a
| known number of names within the cell or when the surname is the first item
| in the cell.
|
| Can someone please tell me how to split out the surname when I have data
| such as "Dr Andrew Frederick Smith" and "Dr Jane Jones" i.e. the number of
| names, initials, whatever is variable - therefore I need to find the space by
| starting at the right hand end instead of the left ?
|
| Any assistance would be much appreciated.
| Hinemoa



  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 6
Default Split surname from end of name data

Many thanks for your help
Serena

"Peo Sjoblom" wrote:

One way

=MID(A1,FIND("^^",SUBSTITUTE(A1," ","^^",LEN(A1)-LEN(SUBSTITUTE(A1,"
",""))))+1,1024)


will return the last word/string separated by a space, make sure there are
no trailing spaces or else you will get a blank cell

=MID(TRIM(A1),FIND("^^",SUBSTITUTE(TRIM(A1),"
","^^",LEN(TRIM(A1))-LEN(SUBSTITUTE(TRIM(A1)," ",""))))+1,1024)

will take care of trailing spaces



--


Regards,


Peo Sjoblom


"Serena" wrote in message
...
Hi all

I've seen lots of posts about how to split up name data when there are a
known number of names within the cell or when the surname is the first
item
in the cell.

Can someone please tell me how to split out the surname when I have data
such as "Dr Andrew Frederick Smith" and "Dr Jane Jones" i.e. the number of
names, initials, whatever is variable - therefore I need to find the space
by
starting at the right hand end instead of the left ?

Any assistance would be much appreciated.
Hinemoa




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
Change around surname and name kassie Excel Discussion (Misc queries) 8 June 10th 07 07:01 AM
Surname and First names formula Steved Excel Worksheet Functions 8 August 7th 06 07:20 AM
Challenge: Copy across surname notyetnoob Excel Worksheet Functions 2 August 1st 06 03:31 AM
Splitting firstName from Surname Althea Excel Worksheet Functions 5 April 23rd 06 09:05 PM
Display only surname Pat Excel Worksheet Functions 2 June 23rd 05 10:30 PM


All times are GMT +1. The time now is 09:25 PM.

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"