Can't convert text to numbers because of spaces

mummo

New Member
Joined
Apr 2, 2021
Messages
29
Office Version
  1. 365
Platform
  1. Windows
I have a table with about 1200 rows and the data is from a pdf file. The numbers in the original pdf had spaces as 1000 separator, so now I have text cells with "12 000" for example. How do I remove the spaces so I can convert them to numbers?

Find & replace says there is no instances to replace and =SUBSTITUTE(A1;" ";"") does nothing.
 

Excel Facts

Ambidextrous Undo
Undo last command with Ctrl+Z or Alt+Backspace. If you use the Undo icon in the QAT, open the drop-down arrow to undo up to 100 steps.
If you look at the formatting of cell A1, what does it show the format to be?

And what does this return?
Excel Formula:
=LEN(A1)

Also, what does this formula return?
Excel Formula:
=CODE(LEFT(RIGHT(TRIM(A1);4);1))
 
Upvote 0
If you look at the formatting of cell A1, what does it show the format to be?

And what does this return?
Excel Formula:
=LEN(A1)

Also, what does this formula return?
Excel Formula:
=CODE(LEFT(RIGHT(TRIM(A1);4);1))
I checked with 2 different examples, both with the value 28 000, other showed format as text and the other as number.
Length was 6 on both occasions.
Code returned 160 also on both.
 
Upvote 0
Try

Edit: Change comma to ";"

I thouhgt @Joe4 is away that's why I stepped in, otherwise I would not have.

Excel Formula:
=--SUBSTITUTE(A1;CHAR(160);"")
 
Upvote 0
Upvote 0
Try

Edit: Change comma to ";"

I thouhgt @Joe4 is away that's why I stepped in, otherwise I would not have.

Excel Formula:
=--SUBSTITUTE(A1;CHAR(160);"")
Code 160 means that it is not a normal space, it is a special non-breaking space (common on files downloaded from the internet or other sources).
See: ASCII table - Table of ASCII codes, characters and symbols

So try this instead to convert the entry to a number:
Excel Formula:
=SUBSTITUTE(A1;CHAR(160);"")+0
Thank you guys, this was the problem and now it works!
 
Upvote 0
You are welcome!
Glad we were able to help!
 
Upvote 0

Forum statistics

Threads
1,223,909
Messages
6,175,314
Members
452,634
Latest member
cpostell

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