I am trying to remove non-numeric character in a cell. Can someone help what should be the right formula?
Assuming A1 has a value of (453) 567-1234.
What should be the formula for the cell to have only 4535671234?
I am trying to remove non-numeric character in a cell. Can someone help what should be the right formula?
Assuming A1 has a value of (453) 567-1234.
What should be the formula for the cell to have only 4535671234?
There are many regex patterns to return just digits.
The following is one of them
Returned as number:
=REGEXREPLACE($A$1,"\D+", "")+0
Returned as text/string:
=REGEXREPLACE($A$1,"\D+", "")
Functions used / more info:
If you want to have only the digits, you can have the following:
=REGEXREPLACE(A1,"[^\d]", "")=VALUE(REGEXREPLACE(A1,"[^\d]", ""))For more references of the regex language google sheets uses, you have the documentation here.