James Yin
James Yin

Reputation: 11

google sheet, position of first number in a string

BJ190215P00020000

this is the string. I want to extract the left letters "BJ" (they are from 1 letter up to letters).

I think i need to find the position of the first digit, then apply LEFT function to get out the "BJ". (the letters could be 1-8).

is there a way to find the position of first digit in the string. OR, is there a better way to extract the letters before the first digit?

Upvotes: 1

Views: 1450

Answers (1)

pnuts
pnuts

Reputation: 59485

Try ...

=regexextract(A1,"\D+")

Upvotes: 2

Related Questions