View Single Post
  #4   Report Post  
Domenic
 
Posts: n/a
Default

If you're number is always 5 digits in length, try...

=MID(A1,MIN(SEARCH({0,1,2,3,4,5,6,7,8,9},A1&"01234 56789")),5)+0

Otherwise...

=LOOKUP(9.99999999999999E+307,--MID(A1,MIN(SEARCH({0,1,2,3,4,5,6,7,8,9},A
1&"0123456789")),ROW(A$1:INDEX(A:A,LEN(A1)))))

Hope this helps!

In article ,
"Rich Hayes" wrote:

In column A I have 1000 rows of text.Within each line of text in this column
is a 5 digit number that is at different points within the text. Is there any
way I can extract the 5 digit number and have it in column B alongside the
text it came from?

e.g. some text is dfgjdfgdfgd14532sfddfgdfg
other text is dfgsdfgsdfgdfgdfgdfgdf14321
i.e totally random text but with a number in there.

If it was always at the end of the text i'd simply do a formula =RIGHT(A1,5)
However it's not that simple.

Any help is greatly appreciated

Regards

Rich