Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Kim C via OfficeKB.com
 
Posts: n/a
Default Trim cell contents

I have a long list of names in Excel where the first and last name are in one
cell. I want to split the names with first name in one cell and last name in
another cell. I know how to use the "Left" and "right" functions but then I
have to use a different formula for each name since each name is a different
length. Is there an easier way to do this?

--
Kim
  #2   Report Post  
Anne Troy
 
Posts: n/a
Default

You bet. See Data--Text to Columns:
http://www.officearticles.com/excel/...soft_excel.htm

*******************
~Anne Troy

www.OfficeArticles.com
www.MyExpertsOnline.com



"Kim C via OfficeKB.com" wrote in message
...
I have a long list of names in Excel where the first and last name are in

one
cell. I want to split the names with first name in one cell and last name

in
another cell. I know how to use the "Left" and "right" functions but then

I
have to use a different formula for each name since each name is a

different
length. Is there an easier way to do this?

--
Kim



  #3   Report Post  
KL
 
Posts: n/a
Default

Hi Kim,

Try this:

=LEFT(TRIM(A1),FIND(" ",TRIM(A1))-1)

and

=MID(TRIM(A1),FIND(" ",TRIM(A1))+1,LEN(TRIM(A1)))

Regards,
KL


"Kim C via OfficeKB.com" wrote in message
...
I have a long list of names in Excel where the first and last name are in
one
cell. I want to split the names with first name in one cell and last name
in
another cell. I know how to use the "Left" and "right" functions but then
I
have to use a different formula for each name since each name is a
different
length. Is there an easier way to do this?

--
Kim



  #4   Report Post  
Kim C via OfficeKB.com
 
Posts: n/a
Default

Thanks - that was too easy!

Anne Troy wrote:
You bet. See Data--Text to Columns:
http://www.officearticles.com/excel/...soft_excel.htm

*******************
~Anne Troy

www.OfficeArticles.com
www.MyExpertsOnline.com

I have a long list of names in Excel where the first and last name are in one
cell. I want to split the names with first name in one cell and last name in
another cell. I know how to use the "Left" and "right" functions but then I
have to use a different formula for each name since each name is a different
length. Is there an easier way to do this?


--
Kim


Message posted via OfficeKB.com
http://www.officekb.com/Uwe/Forums.a...tions/200507/1
  #5   Report Post  
Kim C via OfficeKB.com
 
Posts: n/a
Default

Thanks for your help.

KL wrote:
Hi Kim,

Try this:

=LEFT(TRIM(A1),FIND(" ",TRIM(A1))-1)

and

=MID(TRIM(A1),FIND(" ",TRIM(A1))+1,LEN(TRIM(A1)))

Regards,
KL

I have a long list of names in Excel where the first and last name are in
one

[quoted text clipped - 5 lines]
different
length. Is there an easier way to do this?


--
Kim


Message posted via OfficeKB.com
http://www.officekb.com/Uwe/Forums.a...tions/200507/1
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
Display contents of a specific cell even if a group of cells is mo Larry Heine Excel Worksheet Functions 5 December 4th 08 10:33 PM
Function syntax to compare cell contents ES Excel Worksheet Functions 2 May 18th 05 03:53 PM
How do I find the contents of a cell using the "ADDRESS" function. sweeney Excel Worksheet Functions 2 April 5th 05 03:23 AM
Insert new row as cell contents change George Excel Discussion (Misc queries) 2 January 26th 05 11:47 AM
GET.CELL Biff Excel Worksheet Functions 2 November 24th 04 07:16 PM


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