Reformatting All Numbers in a Column

pclutts

New Member
Joined
Dec 6, 2005
Messages
3
I need to change all numbers in a column from 012345678 to 0123-45-678. Can anyone tell me how to do that globally instead of changing them one at a time? Thanks in advance for the help.
 

Excel Facts

Copy PDF to Excel
Select data in PDF. Paste to Microsoft Word. Copy from Word and paste to Excel.
Hi,
Just select the column and Format, pick Custom and type 0000-00-000 in the box.

HTH

John
 
Upvote 0
Either use jdc's suggestion, or something along the lines of

=left(a1,4)&"-"&mid(a1,5,2)&"-"&right(a1,3)
 
Upvote 0
I used jdc's suggestion and it worked. However, leading zeros where removed, and I need to keep them. Also, I have to double-click on every individual cell to get the reformatting to take affect. I wanted to be able to make this change globally. Any other help is appreciated. Thanks.
 
Upvote 0

Forum statistics

Threads
1,214,621
Messages
6,120,563
Members
448,972
Latest member
Shantanu2024

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