View Single Post
  #2   Report Post  
JMB
 
Posts: n/a
Default

one way, assuming the data is in cell B3

=IF(NOT(ISERROR(VALUE(B3))),B3,LEFT(B3,MATCH(0,(CO DE(MID(B3,ROW(INDIRECT("1:"&LEN(B3))),1))47)*(COD E(MID(B3,ROW(INDIRECT("1:"&LEN(B3))),1))<58)*ROW(I NDIRECT("1:"&LEN(B3))),0)-1))

when you enter the formula, you must hit Cntrl+Shift+Enter.



"Christophe" wrote:

Hello:
I am looking for a way to parse the examples below in excel:
124 A into 124
12345 into 12345
55/49 into 55
888b into 888

Does such function exist in excel or any idea how I could implement it
in VBA? The longest serie of digits before a non numeric character is
what I am looking for.

Thanks a lot,
Chris