Forum Discussion
KB7GP
Dec 15, 2019Copper Contributor
Finding a number in a text string
I have test strings from 3 to 7 characters, one of which is a number 0-9. The number is not in the same place but may be in the first to third position. How can I have a cell report that number’s posi...
SergeiBaklan
Dec 15, 2019Diamond Contributor
As variant, for such texts
text before the number
=LEFT(A2,MATCH(1,--ISNUMBER(--MID(A2,ROW($1:$3),1)),0)-1)
and after the number
=RIGHT($A2,LEN($A2)-LEN(B2)-1)