Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 9
Default separate lastname from firstname

if lastname and firstname is in one column, can you separate it into two
columns?

--
Message posted via http://www.officekb.com

  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 515
Default separate lastname from firstname

Yes you can.
Use =LEFT(A1,SEARCH(" ",A1,1)-1) in B1
and =RIGHT(A1,LEN(A1)-LEN(B1)-1) in C1

--
HTH

Kassie

Replace xxx with hotmail


"enrico via OfficeKB.com" wrote:

if lastname and firstname is in one column, can you separate it into two
columns?

--
Message posted via http://www.officekb.com


  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 9
Default separate lastname from firstname

what if you have two names and a middle name like:

Olmos, Edward James C.

--
Message posted via http://www.officekb.com

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 515
Default separate lastname from firstname

Then it becomes a little more complicated.

In B1 - =LEFT(A1,SEARCH(",",A1,1)-1);
In C1 - =MID(A1,LEN(B1)+3,SEARCH(" ",A1,LEN(B1)+2)-1);
In D1 - =MID(A1,LEN(B1)+LEN(C1)+4,SEARCH("
",A1,LEN(B1)+LEN(C1)+4)-LEN(B1)-LEN(C1)-4), all on one line; and
in E1 - =RIGHT(A1,LEN(A1)-LEN(B1)-LEN(C1)-LEN(D1)-4), and then you will end
up with "C.", if that's alright

--
HTH

Kassie

Replace xxx with hotmail


"enrico via OfficeKB.com" wrote:

what if you have two names and a middle name like:

Olmos, Edward James C.

--
Message posted via http://www.officekb.com


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
Is there a way to separate FirstName and LastName ? Mark246 Excel Discussion (Misc queries) 4 February 24th 08 01:42 AM
LastName, FirstName covert to FirstName LastName Craig860 Excel Discussion (Misc queries) 4 January 14th 08 09:58 PM
How to change lastname, firstname to firstname lastname in Excel? mert Excel Discussion (Misc queries) 1 January 9th 08 06:06 PM
Firstname Lastname Field, Split two cells Anthony Smith Excel Worksheet Functions 6 February 24th 07 03:37 PM
FirstName, LastName and vice versa Bob Excel Worksheet Functions 3 October 27th 06 06:54 PM


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