For example:
The value of A5 is "100pairs" or "100M" or "100s" (basically anything that has a number and text)
I want the cell A1 to show only the number of A5, which is 100.
Is there any formulas that can do that?
Thanks!
For example:
The value of A5 is "100pairs" or "100M" or "100s" (basically anything that has a number and text)
I want the cell A1 to show only the number of A5, which is 100.
Is there any formulas that can do that?
Thanks!
Re: Extract numbers from a number-text-mixed cell
Hi..
If all the numbers have 3 digits use = LEFT (A2, 3)
Re: Extract numbers from a number-text-mixed cell
Quote from marreco;592093Hi..
If all the numbers have 3 digits use = LEFT (A2, 3)
Thanks, but my target cells are variables, most of time the number is 3 digits, but sometimes it is 2 or 1 digit.
So is there any way to just get the number? I dont want to change the code every time the variable changes.
Re: Extract numbers from a number-text-mixed cell
Hi Jerry
This should get you over the line. Attached a file to show workings. Just refer to GetNum in formula as shown in the file.
Take care
Smallman
Re: Extract numbers from a number-text-mixed cell
Thanks a lot, Mr. Small!
It works perfectly!
Re: Extract numbers from a number-text-mixed cell
No worries, you are most welcome.
Don’t have an account yet? Register yourself now and be a part of our community!