ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Extract data in a string (https://www.excelbanter.com/excel-discussion-misc-queries/196348-extract-data-string.html)

Tith

Extract data in a string
 
I've been scouring ths threads here, but can't quite find what I'm looking
for.
I am making a spread sheet with list of starndard parts. The Part name looks
like this: nas1101-04-08, nas1101-4-4, nas1101-04-4. I need to extract the
number between the dashes. I need to be able to tell the difference between
04, and 4

Lars-Åke Aspelin[_2_]

Extract data in a string
 
On Fri, 25 Jul 2008 12:15:01 -0700, Tith
wrote:

I've been scouring ths threads here, but can't quite find what I'm looking
for.
I am making a spread sheet with list of starndard parts. The Part name looks
like this: nas1101-04-08, nas1101-4-4, nas1101-04-4. I need to extract the
number between the dashes. I need to be able to tell the difference between
04, and 4


If the first dash is always the fifth character of the part name you
can try this formula:

=LEFT(MID(A1,6,10),FIND("-",MID(A1,6,10))-1)

Hope this helps / Lars-Åke

Cordell

Extract data in a string
 
This seems a little cumbersome, but works.

=MID(A1,FIND("-",A1)+1,FIND("-",A1,FIND("-",A1)+1)-FIND("-",A1)-1)
--
Cordell


"Tith" wrote:

I've been scouring ths threads here, but can't quite find what I'm looking
for.
I am making a spread sheet with list of starndard parts. The Part name looks
like this: nas1101-04-08, nas1101-4-4, nas1101-04-4. I need to extract the
number between the dashes. I need to be able to tell the difference between
04, and 4


Tith

Extract data in a string
 
This works great the way I got it to work was very clumbersome. I like your
shorter version. Thanks a lot.

"Cordell" wrote:

This seems a little cumbersome, but works.

=MID(A1,FIND("-",A1)+1,FIND("-",A1,FIND("-",A1)+1)-FIND("-",A1)-1)
--
Cordell


"Tith" wrote:

I've been scouring ths threads here, but can't quite find what I'm looking
for.
I am making a spread sheet with list of starndard parts. The Part name looks
like this: nas1101-04-08, nas1101-4-4, nas1101-04-4. I need to extract the
number between the dashes. I need to be able to tell the difference between
04, and 4



All times are GMT +1. The time now is 11:57 PM.

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