I have varying strings that start with letters or numbers. If they start with letters, I need to be able to get a len() of the letters that preceed the first number in the string. I do not want it to count any letters that follow after the first number. 30m with chatgpt did not resolve this. Any help?
Logically, this should work. However, it errors.
Len(
Left(
Label58.Text,
Find(
Match(Label58.Text, "[0-9]"),
Label58.Text,
1
) - 1
)
)
So, these text inputs should result:
"12345" Result = 0, or NULL
"123X42" Result = 0, or NULL
"vr12345" Result = 2
"Vr234abc" Result = 2