Convert Numbers Text into Numbers

pto160

Well-known Member
Joined
Feb 1, 2009
Messages
505
Office Version
  1. 365
Platform
  1. Windows
How can I convert a number that is text into a number? The decimal number could have one or two spaces after the whole number. For example 123 10. I would like 123.10. Text that has 0 decimal points like 456 would be 456.00. I think once I can convert the text to numbers I can then format the cell.

Book1
AB
1TextWhat I like
2456 23456.23
3789 57789.57
410000 2310,000.23
5812812.00
61000 581,000.58
Sheet2
 
The last two digits are the numbers after the decimal point.
In that case you could do it with a single substitution like this. (It appears that your 'numbers' have spaces in place of the decimal point and thousand separator so this would also work if you had any larger numbers like row 6)

BTW, I am not sure what post you had marked as the answer before, if any, but can you please mark the post that (for you) best answers the original question, not this new one. The reason is that the marked answer appears immediately below the original question so that future readers can find the question and answer together at the start of the post. :)

25 02 20.xlsm
AB
1What I like
26 110 616,110.61
325 080 4525,080.45
410 000 0010,000.00
5143 743 81143,743.81
61 143 743 811,143,743.81
Text to Number
Cell Formulas
RangeFormula
B2:B6B2=SUBSTITUTE(A2," ","")/100
 
Last edited:
Upvote 0
Peter_SSs, thank you so much for your solution. It works great. (y) :)
Thank you for explaining about marking the best solution. I did not know that.
 
Upvote 0
Peter_SSs, thank you so much for your solution. It works great.
Good news. Thanks for the confirmation. :)


Thank you for explaining about marking the best solution. I did not know that.
No problem, but I'm not sure that you have understood as you had left post #10 as the marked solution when it is not a solution to the original question as seen below** so I have unmarked that post. You can mark another one as the solution to the original question if you want.

** In the mini sheet below I have modified the post #10 formula as REP() is not a function in English Excel at least & I'm sure Dante meant the function REPT() instead.

25 02 20.xlsm
ABC
1Text post 1What I likeWhat you get from post 10
2456 23456.23456.23
3789 57789.57789.57
410000 2310000.2310000.23
58128120.812
61000 581000.581000.58
Text to Number (3)
Cell Formulas
RangeFormula
C2:C6C2=LET(a,TRIM(RIGHT(SUBSTITUTE(A2," ",REPT(" ",99)),99)),SUBSTITUTE(LEFT(A2,LEN(A2)-LEN(a))," ","")&"."&a)+0
 
Upvote 0

Forum statistics

Threads
1,226,798
Messages
6,193,065
Members
453,773
Latest member
bclever07

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top