remove dashes

javalover

Board Regular
Joined
Jan 6, 2006
Messages
74
Hello Board,

I have a column seven-digit numbers that I need to remove dashes, however, when I use text to columns, delimited, it removes the zeros.

142-056-78 becomes 142 56 78

The goal is to get this number to look like this: 14205678

Thanks for your help!
 

Excel Facts

Excel motto
Not everything I do at work revolves around Excel. Only the fun parts.
Hi,

On the final screen in the Text To Columns Wizard, select each column in turn and choose the Text data format for each of them. This will preserve the zeros but note that your numbers will be stored as strings and they will be split into three columns. I assume that's what you want?
 
Upvote 0
VoG: your formula worked (I liked how easy), except on this number: 054-780-01
it dropped the zero before 54. (??)

Colin: this worked for me...thank you!
 
Upvote 0
Hi,

Just FYI, to keep the leading zero, VoG's formula just needs a little tweak:
Code:
=SUBSTITUTE(A1,"-","")&""
 
Upvote 0

Forum statistics

Threads
1,224,600
Messages
6,179,834
Members
452,947
Latest member
Gerry_F

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