Removing dashes in a number/leading zero's disappearing

markin

New Member
Joined
Nov 15, 2005
Messages
3
I'm telling Excel to do something and it's not obeying my request. I have the following part numbers setup in a column:

000-12345
010-32343
005-16431

I'm wanting to remove the dashes from these part numbers so I use the replace command under edit and for replace I put a - and replace with nothing. For some reason it's deleting the leading zero's so I get:

12345
1032343
516431

If I don't have leading zero's in the part number then this works just fine. I've tried formatting the fields as general and as text and nothing works.

Why is Excel removing the leading zero's and how can I fix this?

Thanks....Mark
 

Excel Facts

Waterfall charts in Excel?
Office 365 customers have access to Waterfall charts since late 2016. They were added to Excel 2019.
Insert a colum and try this formula,

=SUBSTITUTE(A1,"-",""),

Then you can hide the original column.
 
Upvote 0
I had tried the substitute function using the insert function menu and it wouldn't let me leave the new text field empty. I guess manually typing the function out is the only thing that works.

Thanks for your help....Mark
 
Upvote 0

Forum statistics

Threads
1,203,028
Messages
6,053,123
Members
444,640
Latest member
Dramonzo

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