Search code examples
regexgoogle-sheetssearchfindgoogle-sheets-formula

How do I find the position of first number in a string in Google Sheets


I'm trying to find the position of the first number in a string (cell E4) in Google Sheets

I've tried:

=FINDB("\D+";E4)
=FINDB("[0-9]";E4)
=FINDB("[0-9]+";E4)

But none of these have worked

An example could be "I am 23 year old" then the position of the first number would be 6

Any ideas?


Solution

  • try it like this:

    =FINDB(REGEXEXTRACT(A1; "\d"); A1)
    

    0