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 » Worksheet Functions
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

separate lastname from firstname



 
 
Thread Tools Display Modes
  #1  
Old April 14th, 2009, 04:50 AM posted to microsoft.public.excel.worksheet.functions
enrico via OfficeKB.com
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  
Old April 14th, 2009, 05:22 AM posted to microsoft.public.excel.worksheet.functions
kassie
external usenet poster
 
Posts: 444
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  
Old April 14th, 2009, 05:48 AM posted to microsoft.public.excel.worksheet.functions
enrico via OfficeKB.com
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  
Old April 14th, 2009, 06:56 AM posted to microsoft.public.excel.worksheet.functions
kassie
external usenet poster
 
Posts: 444
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


 




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 10:39 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.