View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
David Billigmeier David Billigmeier is offline
external usenet poster
 
Posts: 176
Default Find the 1st occurance of a number in a cell

Commit both of these functions as array formulas (CTRL+SHIFT+ENTER)

To find the position of the first numerical value:

=MATCH(TRUE,ISNUMBER(--(MID(A1,ROW(INDIRECT("1:"&LEN(A1))),1))),0)

And then to extract that number from the string, use the above formula
embedded in the MID() function:

=MID(A1,MATCH(TRUE,ISNUMBER(--(MID(A1,ROW(INDIRECT("1:"&LEN(A1))),1))),0),1)


--
Regards,
Dave


"lovemuch" wrote:

The cell's text is:
Reclassed to 101-001-4455-003.
I want to find the position of the first number, which in this case would be
the number "1" and it would be in the 14th place (if I counted right!). The
text will vary, so the locate of the number will vary, and the number itself
will vary.

I should be able to figure this out, but it's become like looking at your
best friend and not being able to remember their name!

Thanks for anyone's assistance!

Yours truly.....Cynthia :-)