Turn blank spaces into zeros

adoy73

New Member
Joined
Mar 14, 2006
Messages
46
I use Excel 2003.

I have a list of various numbers in a column. These should be 10 digit numbers, however the problem is that for the last 5 digits zeros are replaced by spaces. Is there a way to turn each space into zeros?

for instance what should be

"1262301140"

shows up as

"12623 114 "

However in other situations the number is fine:

7206833364

How can right a formula where it will replace zeros where there are spaces, but leave the normal numbers alone?

Thank you.
 

Excel Facts

Easy bullets in Excel
If you have a numeric keypad, press Alt+7 on numeric keypad to type a bullet in Excel.
the second example 7206833364 has a zero why is this fine you question say to remove all zeros ??

does this zero need removing or not, if not you need to state why not and give more examples of when a zero should not be removed
 
Upvote 0
if all zeros are to be removed look at the function SUBSTITUTE

try

Code:
=SUBSTITUTE(B26,0,"")

replace B26 with you cell, then use copy and paste special values to remove the formula

HTH
 
Upvote 0
As I mentioned only the last 5 digits have zeros replaced by spaces. But the substitute function worked. Thanks.
 
Upvote 0

Forum statistics

Threads
1,214,641
Messages
6,120,692
Members
448,979
Latest member
DET4492

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