ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Extracting text from a cell (https://www.excelbanter.com/excel-discussion-misc-queries/119275-extracting-text-cell.html)

kfowlow

Extracting text from a cell
 
What is the easiest way to extract the text between the " - " in this cell

Churchill County - Cottonwood Canyon - Geology

I can start the pull out oaky from the left, but how do I go to the " - " on
the right? It seems easy but haven't found the right function or a group of
functions yet.

Thanks for the help in advance.


Gary''s Student

Extracting text from a cell
 
This is in several cells to make it easier to follow. You can combine it
into one cell if you like:

in A1:
Churchill County - Cottonwood Canyon - Geology
in A2:
=FIND("-",A1,1)+2 where center text starts
in A3:
=FIND("-",A1,A2)-1 where center text ends
in A4
=MID(A1,A2,A3-A2)

The trick is finding the second "-" by starting after the first one!!


--
Gary's Student


"kfowlow" wrote:

What is the easiest way to extract the text between the " - " in this cell

Churchill County - Cottonwood Canyon - Geology

I can start the pull out oaky from the left, but how do I go to the " - " on
the right? It seems easy but haven't found the right function or a group of
functions yet.

Thanks for the help in advance.


PCLIVE

Extracting text from a cell
 
Try using Text to Colums under the Data menu. Use Delimited. Choose other
for Delimiters and type "-".

HTH,
Paul

"kfowlow" wrote in message
...
What is the easiest way to extract the text between the " - " in this cell

Churchill County - Cottonwood Canyon - Geology

I can start the pull out oaky from the left, but how do I go to the " - "
on
the right? It seems easy but haven't found the right function or a group
of
functions yet.

Thanks for the help in advance.





All times are GMT +1. The time now is 08:43 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com