Extract data in a string

  • Thread starter Thread starter Tith
  • Start date Start date
T

Tith

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
 
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
 
This seems a little cumbersome, but works.

=MID(A1,FIND("-",A1)+1,FIND("-",A1,FIND("-",A1)+1)-FIND("-",A1)-1)
 
This works great the way I got it to work was very clumbersome. I like your
shorter version. Thanks a lot.
 
Back
Top