+ Reply to Thread
Results 1 to 4 of 4

Removing extra digits from a zip code

  1. #1
    Registered User
    Join Date
    05-26-2015
    Location
    Chicago
    MS-Off Ver
    2013
    Posts
    29

    Removing extra digits from a zip code

    Hello,

    I have a large spread sheet filled with customer info including their address with zip code. Depending on how the data was entered, some zip codes are only five digits, and others have the extra four with the hyphen.

    How do I remove the extra figures in the other zip codes without going through 10s of thousands of lines?

    Thank you in advance.
    Attached Files Attached Files

  2. #2
    Forum Guru AlKey's Avatar
    Join Date
    07-20-2009
    Location
    Lakeland, FL USA
    MS-Off Ver
    Microsoft Office 2010/ Office 365
    Posts
    8,903

    Re: Removing extra digits from a zip code

    You can use this formula to get part that you need from the left.

    in B2 and copy down

    =TEXT(LEFT(A2,5),"00000")

    Row\Col
    A
    B
    1
    Zip
    2
    60004 60004
    3
    60004 60004
    4
    60004 60004
    5
    60004-1557 60004
    6
    60004-1802 60004
    7
    60004-2084 60004
    8
    60004-2530 60004
    9
    60004-2530 60004
    If you like my answer please click on * Add Reputation
    Don't forget to mark threads as "Solved" if your problem has been resolved

    "Nothing is so firmly believed as what we least know."
    --Michel de Montaigne

  3. #3
    Registered User
    Join Date
    05-26-2015
    Location
    Chicago
    MS-Off Ver
    2013
    Posts
    29

    Re: Removing extra digits from a zip code

    Thanks! That worked! I also tried text to columns with using the hyphen as the separator and that gave me the desired result as well.

  4. #4
    Forum Guru AlKey's Avatar
    Join Date
    07-20-2009
    Location
    Lakeland, FL USA
    MS-Off Ver
    Microsoft Office 2010/ Office 365
    Posts
    8,903

    Re: Removing extra digits from a zip code

    Thank you for the feedback!

    There is another benefit of using TEXT function. It will add missing leading zeros if needed.

+ 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. Removing EXTRA dupes
    By tommark in forum Excel General
    Replies: 7
    Last Post: 07-07-2013, 12:55 PM
  2. [SOLVED] Removing Extra Whitespace
    By sperry2565 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 07-03-2013, 10:00 AM
  3. Removing extra sheets.
    By pawnraider in forum Excel General
    Replies: 6
    Last Post: 11-29-2012, 11:46 AM
  4. [SOLVED] adding extra digits to columns
    By Graham at Mac's in forum Excel General
    Replies: 2
    Last Post: 08-21-2006, 06:25 AM
  5. RE: adding extra digits to columns
    By Muhammed Rafeek M in forum Excel General
    Replies: 0
    Last Post: 08-21-2006, 06:05 AM

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