Get Part of String

  • Thread starter Thread starter Scott
  • Start date Start date
S

Scott

I have the below text values (Column A) in a sheet. For each value, I need
to extract the "8" or "10" within each value into column B. This part of the
text string represents an integer that represents the product length.

Given the fact that this "product length" part maybe a single digit or a
double digit number, I'm trying to find a formula that will extract it no
matter if it's 1 or 2 digits.

Any help?

A B
----------------------------------
1 2x8 #1 8
2 2x8 #2 8
3 2x8 P 8
4 2x8 #3 8
5 2x8 #4 8
6 2x8 HM 8
6 2x10 #1 10
7 2x10 #2 10
8 2x10 P 10
 
I have the below text values (Column A) in a sheet. For each value, I need
to extract the "8" or "10" within each value into column B. This part of the
text string represents an integer that represents the product length.

Given the fact that this "product length" part maybe a single digit or a
double digit number, I'm trying to find a formula that will extract it no
matter if it's 1 or 2 digits.

Any help?

A B
----------------------------------
1 2x8 #1 8
2 2x8 #2 8
3 2x8 P 8
4 2x8 #3 8
5 2x8 #4 8
6 2x8 HM 8
6 2x10 #1 10
7 2x10 #2 10
8 2x10 P 10

Try this formula:

=TRIM(MID(A1,FIND("x",A1)+1,2))

Hope this helps / Lars-Åke
 
Back
Top