I have a data set in which there are several cells that should contain numbers but are formatted as text.
What I am trying to do is enter a formula that checks for the presence of any of the following charcters (0, 1, 2,3, 4, 5, 6, 7, 8, 9), and if found returns the value in the cell as a NUMBERVALUE, otherwise returns the value of the cell as it is.
I have tried with a COUNTIF like this: =IF(COUNTIF(A1,”0123456789“),NUMBERVALUE(A1),A1), however it returns the value of the cell as it is whether the cell contains one of the charachters from 0 to 9 or not.
What could be the solution for this?
Moataz Goubarah is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.