From your example you are looking for 60**** type numbers
try something like this
ColFrom = 4 ' what it is
rowSt= 3 ' start row then looped
while cells(colfrom,rowst)<>""
p=instr(cells(colfrom,rowst),"60")
if p >0 then
cells(colfrom+1,rowst)=mid(cells(colfrom,rowst),p,6)
' adjust the 6 for size of numbers
end if
rowst=rowst+1
wend
restricts results to 60 numbers. Does presume there is always a space following the end of the 60 number (or the end of the string) and also always a space before the 60 number (or the start of the string).
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.