+ Reply to Thread
Results 1 to 4 of 4

convert a 4 digit zip code to 5 digit zip code

  1. #1
    Valued Forum Contributor
    Join Date
    11-20-2003
    MS-Off Ver
    2010, 2016
    Posts
    1,176

    convert a 4 digit zip code to 5 digit zip code

    I have an address (city, state, zip format) in a cell. Some of the zip codes only have a 4-digit zip code which is the way the file was received. I know these zip codes have leading zero. How can I convert these to a five-digit code. Examples are as follows:

    Waltham MA 2453
    convert to 'Waltham MA 02453'


    Boston MA 2210
    convert to 'Boston MA 02210'


    CEDAR GROVE, NJ 7009-1174
    convert to 'CEDAR GROVE, NJ 07009-1174'


    TEANECK CITY, NJ 7666
    convert to 'TEANECK CITY, NJ 07666'

  2. #2
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: convert a 4 digit zip code to 5 digit zip code

    Perhaps the simplest way is to use a helper cell.

    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Richard Buttrey

    RIP - d. 06/10/2022

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

  3. #3
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    16,043

    Re: convert a 4 digit zip code to 5 digit zip code

    Or this (even for variable number of words in text)
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Never use Merged Cells in Excel

  4. #4
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582

    Re: convert a 4 digit zip code to 5 digit zip code

    Are these zip codes in their own cell? Do you just want the 5th digit for appearance sake?
    If yes to both, simply format the cell to Custom 00000
    ChemistB
    My 2?

    substitute commas with semi-colons if your region settings requires
    Don't forget to mark threads as "Solved" (Edit First post>Advanced>Change Prefix)
    If I helped, Don't forget to add to my reputation (click on the little star at bottom of this post)

    Forum Rules: How to use code tags, mark a thread solved, and keep yourself out of trouble

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] LOTTERY FILTER#4, Find if 1 Digit Sum of 2 Digit or 3 Digit, Single Cell w/ dash
    By david gonzalez in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 03-08-2014, 12:57 AM
  2. Take first digit from code and match to table
    By unclejemima in forum Excel General
    Replies: 1
    Last Post: 05-06-2013, 06:48 PM
  3. [SOLVED] How to replace a certain digit using VBA code
    By Shishek in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-25-2013, 08:47 AM
  4. 6 digit code to date
    By wawa in forum Excel General
    Replies: 3
    Last Post: 12-08-2009, 08:07 PM
  5. [SOLVED] 12 digit code sorting
    By Mark in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 10-31-2005, 07:05 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1