Format Zip Code

lipipe

New Member
Joined
Aug 13, 2011
Messages
40
Good Evening,

I am trying to make the zip codes in my file uniform. Currently I have some zip codes that are 03301-2862, some that are 06416, and some that are 03301-0000. I want to make all of the 5-4. When I try to do it in excel with number format it takes 06416 and makes it 0000-6416. How can I leave the zip codes that are 5-4 along and fix the single 5 digit zip codes without messing up the code itself.

Thanks in advance.

Jack
 

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.
You could use conditional formatting.

For example, format A1 as 00000-0000 number format. You can then use conditional formatting less less than 99999 and then set the number format to 00000.

The only way that would fail is if you had 00001-1111 as that would read 5 digits, but since the lowest zip code is 00501, then that should do the trick.
 
Upvote 0

Forum statistics

Threads
1,224,270
Messages
6,177,574
Members
452,784
Latest member
talippo

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