Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
Jambruins
 
Posts: n/a
Default Find text within cell then display text to left

In cell E2 I have the following:
St Louis Cardinals vs Pittsburgh Pirates for Game

In cell E10 I have the following:
Chicago Cubs vs Los Angeles Dodgers for Game

I would like a formula in cell K2 to do the following:
Find the vs in cell E2 and then display all the text to the left of it (St
Louis Cardinals in this case). I included the cell E10 info so you can see
that the text to the left of the vs is not the same number of characters so I
can't just use the left formula. Any ideas? Thanks.

  #2   Report Post  
Posted to microsoft.public.excel.misc
Biff
 
Posts: n/a
Default Find text within cell then display text to left

Hi!

Try this:

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

Biff

"Jambruins" wrote in message
...
In cell E2 I have the following:
St Louis Cardinals vs Pittsburgh Pirates for Game

In cell E10 I have the following:
Chicago Cubs vs Los Angeles Dodgers for Game

I would like a formula in cell K2 to do the following:
Find the vs in cell E2 and then display all the text to the left of it (St
Louis Cardinals in this case). I included the cell E10 info so you can
see
that the text to the left of the vs is not the same number of characters
so I
can't just use the left formula. Any ideas? Thanks.



  #3   Report Post  
Posted to microsoft.public.excel.misc
Elkar
 
Posts: n/a
Default Find text within cell then display text to left

Try this:

=LEFT(E2,FIND("vs",E2,1)-2)

HTH,
Elkar

"Jambruins" wrote:

In cell E2 I have the following:
St Louis Cardinals vs Pittsburgh Pirates for Game

In cell E10 I have the following:
Chicago Cubs vs Los Angeles Dodgers for Game

I would like a formula in cell K2 to do the following:
Find the vs in cell E2 and then display all the text to the left of it (St
Louis Cardinals in this case). I included the cell E10 info so you can see
that the text to the left of the vs is not the same number of characters so I
can't just use the left formula. Any ideas? Thanks.

  #4   Report Post  
Posted to microsoft.public.excel.misc
Ron Coderre
 
Posts: n/a
Default Find text within cell then display text to left

Try this:

K2: =LEFT(E2,SEARCH(" vs",E2)-1)

Does that help?

***********
Regards,
Ron

XL2002, WinXP-Pro


"Jambruins" wrote:

In cell E2 I have the following:
St Louis Cardinals vs Pittsburgh Pirates for Game

In cell E10 I have the following:
Chicago Cubs vs Los Angeles Dodgers for Game

I would like a formula in cell K2 to do the following:
Find the vs in cell E2 and then display all the text to the left of it (St
Louis Cardinals in this case). I included the cell E10 info so you can see
that the text to the left of the vs is not the same number of characters so I
can't just use the left formula. Any ideas? Thanks.

  #5   Report Post  
Posted to microsoft.public.excel.misc
Jambruins
 
Posts: n/a
Default Find text within cell then display text to left

Thanks for the help. It works perfectly!


  #6   Report Post  
Posted to microsoft.public.excel.misc
Biff
 
Posts: n/a
Default Find text within cell then display text to left

You're welcome. Thanks for the feedback!

If you want to extract Pittsburgh Pirates:

=MID(E2,FIND(" vs ",E2)+4,FIND(" for ",E2)-(FIND(" vs ",E2)+3))

Biff

"Jambruins" wrote in message
...
Thanks for the help. It works perfectly!



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
Matching Text with With Certain Criteria SteveC Excel Worksheet Functions 19 April 4th 06 11:08 AM
How can I make an excel cell equal to the value of a frame object text box directionalman Excel Worksheet Functions 1 February 27th 06 09:24 PM
Find LARGE, and th cell 3 cells to the left? Intotao Excel Worksheet Functions 1 January 9th 06 09:33 PM
Wrapping in Excel (fitting many lines of text in cell to print rig hd3017 Excel Discussion (Misc queries) 3 December 8th 05 01:19 AM
large text amount in cell will not display in the cell dbelch01 Excel Discussion (Misc queries) 3 June 15th 05 03:43 PM


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