I am looking for a way to remove any text from a cell and leave just numbers. So far I have found a few examples, but they either target predefined text or specialized characters.
SUBSTITUTE(A1, ".", "")
SUBSTITUTE(text, old_text, new_text, [nth_appearance])
Example, my cell can contain mixed text and numbers in any position, so how do I just leave the numbers and remove any characters...
lorem1001ipsum
ipsum01lorem
0101lorem
If you want to keep all numbers and period (for example, decimal numbers), add elseif to check for period. Code:
Select your cells and run this small macro: