This section shows how to extract only numbers from a mixed string of numbers and non-numbers.
Text | Result |
---|---|
A-0005 | 0005 |
1234-XXXX_5678 | 12345678 |
Procedure
The CONCAT, MAP, MAKEARRAY, LEN, LAMBDA MID, IFERROR, and NUMBERVALUE functions are used in the formulas.
=CONCAT(MAP(MAKEARRAY(1,LEN(text),LAMBDA(row,col,MID(text,col,1))),LAMBDA(v,IFERROR(NUMBERVALUE(v),""))))
---