Pull string of text from within a cell

kac1125

Board Regular
Joined
Jul 31, 2014
Messages
74
Office Version
  1. 365
Platform
  1. Windows
I need a formula that I can copy down to pull a string of text from within cells. for example, I have the following text in a cell:
44. 78. 9745016. 4. A SXYF JNMOPLATED XYZZ 4OZ 1PK
I want to pull 9745016 from within that cell. This string is 7 digits long. In addition I would like the formula to be able to copy down and and be able to pull an 8 digit string as well from it as well. for example:
44. 78. 10758424. 2. A TAPE & TAPE SILLY SPOONPROOF 11OZ 2PK

<tbody>
</tbody>

<tbody>
</tbody>

I would also like to pull 10758424. Please let me know if you have any ideas.
 

Excel Facts

Select a hidden cell
Somehide hide payroll data in column G? Press F5. Type G1. Enter. Look in formula bar while you arrow down through G.
is there any pattern to the text
will it always start at character 9
will it always end in a .
is it only 7 or 8 characters long
is it always numbers ?
 
Upvote 0
Adding to etaf's questions..

Is it always the 3rd set of characters in the cell (seperated by spaces) ?
Is it always either 7 or 8 digits, could it be more/less ? What are the low and high limits of the digit count?
Are there always . after the first 3 sets of characters ?
 
Last edited:
Upvote 0
Thank you both for looking at this!
they are always the third set of characters.
they are always either 7 or 8 digits long not shorter or longer.
They are always a number.
Hopefully this helps :)

Thanks!
 
Upvote 0
Try

=TRIM(MID(SUBSTITUTE(SUBSTITUTE(A1," ",REPT(" ",255)),".",""),255*2,255))

or this if the first 3 sets of characters always end with a .

=TRIM(MID(SUBSTITUTE(A1,".",REPT(" ",255)),255*2,255))
 
Upvote 0

Forum statistics

Threads
1,215,161
Messages
6,123,377
Members
449,097
Latest member
Jabe

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top