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

I have a cell with the following info in it and i want to seperate the
text to another 2 cells according to where certain characters fall
(vs):

St. George's vs Sliema W.

I want the end result to show St. George's in one cell and Sliema W. in
another (adjacent to it)
I'm trying to use the FIND(find_text,within_text,start_num) in
combination with RIGHT(text,num_chars) but i cannot seem to sort it out
so as to come to the desired result!
Can any1 help?

M

  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 10,593
Default Find Text within a cell

=LEFT(A1,FIND("vs",A1))

=MID(A1,FIND("vs",A1)+2,99)

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"MMuscat" wrote in message
ps.com...
I have a cell with the following info in it and i want to seperate the
text to another 2 cells according to where certain characters fall
(vs):

St. George's vs Sliema W.

I want the end result to show St. George's in one cell and Sliema W. in
another (adjacent to it)
I'm trying to use the FIND(find_text,within_text,start_num) in
combination with RIGHT(text,num_chars) but i cannot seem to sort it out
so as to come to the desired result!
Can any1 help?

M



  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 78
Default Find Text within a cell

Hi M,

One way, assuming the info is in cell a1 is to have in say cell b1

=LEFT(a1,FIND(" vs ",a1)-1)

and in say cell c1

=RIGHT(a1,LEN(a1)-FIND(" vs ",a1)-3)

Anthony
(adapted from David Hepner 9/13/2005)

"MMuscat" wrote:

I have a cell with the following info in it and i want to seperate the
text to another 2 cells according to where certain characters fall
(vs):

St. George's vs Sliema W.

I want the end result to show St. George's in one cell and Sliema W. in
another (adjacent to it)
I'm trying to use the FIND(find_text,within_text,start_num) in
combination with RIGHT(text,num_chars) but i cannot seem to sort it out
so as to come to the desired result!
Can any1 help?

M


  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 7
Default Find Text within a cell

Thanks guys! both work! Anthony's gives a better result!

good day!


Anthony D wrote:
Hi M,

One way, assuming the info is in cell a1 is to have in say cell b1

=LEFT(a1,FIND(" vs ",a1)-1)

and in say cell c1

=RIGHT(a1,LEN(a1)-FIND(" vs ",a1)-3)

Anthony
(adapted from David Hepner 9/13/2005)

"MMuscat" wrote:

I have a cell with the following info in it and i want to seperate the
text to another 2 cells according to where certain characters fall
(vs):

St. George's vs Sliema W.

I want the end result to show St. George's in one cell and Sliema W. in
another (adjacent to it)
I'm trying to use the FIND(find_text,within_text,start_num) in
combination with RIGHT(text,num_chars) but i cannot seem to sort it out
so as to come to the desired result!
Can any1 help?

M



  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 903
Default Find Text within a cell

If it is that simple you change the " vs " to "|"
and then use text to columns under Data, to separate
based on the character delimiter of "|" with no messy
cleanup afterwards to remove formulas and eliminate
the original column.

---
HTH,
David McRitchie, Microsoft MVP - Excel
My Excel Pages: http://www.mvps.org/dmcritchie/excel/excel.htm
Search Page: http://www.mvps.org/dmcritchie/excel/search.htm

"MMuscat" wrote...
I'm trying to use the FIND(find_text,within_text,start_num) in
combination with RIGHT(text,num_chars) but i cannot seem to sort it out
so as to come to the desired result!





  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 78
Default Find Text within a cell

Perhaps a user-settable string delimiter could be useful as well in Text to
Columns,
currently a single character delimiter as 'Other' (e.g. v) seems ok (but not
more than one) ?

Anthony

"David McRitchie" wrote:

If it is that simple you change the " vs " to "|"
and then use text to columns under Data, to separate
based on the character delimiter of "|" with no messy
cleanup afterwards to remove formulas and eliminate
the original column.

---
HTH,
David McRitchie, Microsoft MVP - Excel
My Excel Pages: http://www.mvps.org/dmcritchie/excel/excel.htm
Search Page: http://www.mvps.org/dmcritchie/excel/search.htm

"MMuscat" wrote...
I'm trying to use the FIND(find_text,within_text,start_num) in
combination with RIGHT(text,num_chars) but i cannot seem to sort it out
so as to come to the desired result!




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
In Excel, how do I find one word in a set of text in a cell? man818 Excel Discussion (Misc queries) 4 May 20th 06 02:20 PM
linking a cell containing text to another cell containing text / data gin2000 Excel Discussion (Misc queries) 5 May 19th 06 09:08 PM
Shade cell according to text? Ltat42a Excel Discussion (Misc queries) 0 January 3rd 06 06:37 PM
How do I set text to top of cell next to wrap text in Excel? Carpenter Gary New Users to Excel 1 October 25th 05 06:26 PM
Help inserting a Cell Value in a Text Cell Dave Excel Worksheet Functions 5 March 5th 05 09:06 PM


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