Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 7
Default Splitting text in a cell

Hello,
In Excel 2007, I have a series of cells with the names of two people in them
in the format of "Person One and Person Two". Is there any function which
could put each person's name in a different cell, by looking for the word
"and" to use to decide where to split the text?
I know that if each persons name was the same length, I could use the LEFT
and RIGHT functions, but as name lengths vary, I cannot use these functions
for this.
Thank you.
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 281
Default Splitting text in a cell

Hi,

assumed your data is like: first name+one space+and+onespace+second name
and your data is in column A

for the first name in the cell B2 enter formula below and then copy drag
down to where you need:
=LEFT(A1,Find("and",A1)-2)
for the second name in the cell C2 enter formula below and then copy drag
down to where you need:
=RIGHT(A1,LEN(A1)-3-FIND("and",A1))

Thanks,
--
Farhad Hodjat


"Richard_123" wrote:

Hello,
In Excel 2007, I have a series of cells with the names of two people in them
in the format of "Person One and Person Two". Is there any function which
could put each person's name in a different cell, by looking for the word
"and" to use to decide where to split the text?
I know that if each persons name was the same length, I could use the LEFT
and RIGHT functions, but as name lengths vary, I cannot use these functions
for this.
Thank you.

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 8
Default Splitting text in a cell

A1 - C1 are the headings: Employee Name; FNAme; LName
A2 Baird, Deborah
B2 Enter this formula: =LEFT(A2,((SEARCH(",",A2)))-1)
C2 Enter this formual: =RIGHT(A2,(LEN(A2))-(SEARCH(",",A2)))

B2 will have "Baird"
C2 will display "Deborah"

Copy the contents of B2:C2 as far down the worksheet as you need.

"Richard_123" wrote:

Hello,
In Excel 2007, I have a series of cells with the names of two people in them
in the format of "Person One and Person Two". Is there any function which
could put each person's name in a different cell, by looking for the word
"and" to use to decide where to split the text?
I know that if each persons name was the same length, I could use the LEFT
and RIGHT functions, but as name lengths vary, I cannot use these functions
for this.
Thank you.

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3,268
Default Splitting text in a cell

Please refrain from multiposting the same message in multiple newsgroups


--
Regards,

Peo Sjoblom



"Richard_123" wrote in message
...
Hello,
In Excel 2007, I have a series of cells with the names of two people in
them
in the format of "Person One and Person Two". Is there any function which
could put each person's name in a different cell, by looking for the word
"and" to use to decide where to split the text?
I know that if each persons name was the same length, I could use the LEFT
and RIGHT functions, but as name lengths vary, I cannot use these
functions
for this.
Thank you.



  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 698
Default Splitting text in a cell

See if this does what you want.

=RIGHT(A1,FIND(" ",A1)+1)

HTH
Regards,
Howard

"Richard_123" wrote in message
...
Hello,
In Excel 2007, I have a series of cells with the names of two people in
them
in the format of "Person One and Person Two". Is there any function which
could put each person's name in a different cell, by looking for the word
"and" to use to decide where to split the text?
I know that if each persons name was the same length, I could use the LEFT
and RIGHT functions, but as name lengths vary, I cannot use these
functions
for this.
Thank you.



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 Text strings in one cell Wardy1 Excel Discussion (Misc queries) 1 May 18th 06 01:05 PM
Splitting 1 cell into 2 based on underscore in text RJF Excel Worksheet Functions 5 May 9th 06 07:50 PM
splitting text from one cell rogera Excel Discussion (Misc queries) 1 January 10th 06 01:43 PM
splitting text in a cell.. via135 Excel Discussion (Misc queries) 5 December 23rd 05 01:04 AM
Splitting Up Text in One Cell To Many Bert_Lady Excel Worksheet Functions 3 December 9th 05 01:55 AM


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