#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1
Default splitting name

I have names in one column. i would like to split last names to another column.
Some names have 2 first names.
exp: mary anne smith, susan smith, etc...
just last names to the another column.

Please suggest!
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,501
Default splitting name

Assuming your list starts in a1 put this in B1 and drag down

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

Mike

"mtin" wrote:

I have names in one column. i would like to split last names to another column.
Some names have 2 first names.
exp: mary anne smith, susan smith, etc...
just last names to the another column.

Please suggest!

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 772
Default splitting name

I'm sure someone has a prettier way, but...
=IF(ISERROR(FIND(" ",A1,FIND(" ",A1)+1)),MID(A1,FIND(" ",A1),LEN(A1)-FIND("
",A1)+1),MID(A1,FIND(" ",A1,FIND(" ",A1)+1),LEN(A1)-FIND(" ",A1,FIND("
",A1))))
--
-John
Please rate when your question is answered to help us and others know what
is helpful.


"mtin" wrote:

I have names in one column. i would like to split last names to another column.
Some names have 2 first names.
exp: mary anne smith, susan smith, etc...
just last names to the another column.

Please suggest!

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 5,651
Default splitting name

On Fri, 7 Nov 2008 06:21:01 -0800, mtin wrote:

I have names in one column. i would like to split last names to another column.
Some names have 2 first names.
exp: mary anne smith, susan smith, etc...
just last names to the another column.

Please suggest!


To extract the last name:

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

To remove the last name from the original string, assuming the last name is in
B1, and the full name is in A1:

=SUBSTITUTE(A1,B1,"",(LEN(A1)-LEN(SUBSTITUTE(A1,B1,"")))/LEN(B1))

--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
Splitting cells Splitting Cells Excel Discussion (Misc queries) 3 October 23rd 08 08:25 AM
Splitting Tree*Rat New Users to Excel 3 October 21st 08 12:55 PM
splitting Last Name, First Name buggles Excel Discussion (Misc queries) 4 November 15th 07 01:07 AM
Splitting Numbers Xaenyth Excel Discussion (Misc queries) 2 December 19th 06 05:59 PM
Splitting cells - please help! Danny boy Excel Worksheet Functions 11 October 31st 06 02:54 PM


All times are GMT +1. The time now is 02:50 PM.

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"