+ Reply to Thread
Results 1 to 3 of 3

Covert text to zip codes

  1. #1
    Registered User
    Join Date
    12-01-2009
    Location
    Hawaii
    MS-Off Ver
    Excel 2010
    Posts
    30

    Covert text to zip codes

    I have list of zip codes that were imported to Excel as text. Some are 5-digits and some are 9-digits. How do re-format it to look like a zip code again.

    Data Desired Result
    96720 96720 or 96720-0000
    967201234 96720-1234

    I tried re-formatting the entire column to zip+4, but it doesn't work because the data is Text.
    I also tried multiplying it by 1 to convert it to a number then re-format as zip+4, but for the 5-digit one's i get 00009-6720.

    Any suggestions?
    Last edited by scokaw; 10-17-2013 at 07:11 PM.

  2. #2
    Valued Forum Contributor
    Join Date
    05-13-2010
    Location
    Belo Horizonte, Brazil
    MS-Off Ver
    Excel 2003; 2007
    Posts
    441

    Re: Covert text to zip codes

    Scokaw, Good evening.

    Suppose your data are at column A.

    DO:
    B1 --> =IF(LEN(A1)=5,A1&"-0000",TEXT(A1,"#####-####"))

    Copy it down.

    Is it what you desire?

    I hope it helps.
    ...If my answer helped you, Please, click on. * Add Reputation (at left)

    Best regards.
    Marc?lio Lob?o

  3. #3
    Registered User
    Join Date
    12-01-2009
    Location
    Hawaii
    MS-Off Ver
    Excel 2010
    Posts
    30

    Re: Covert text to zip codes

    This works perfectly.

    Thank you very much.

+ 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. How to covert text from a number
    By jb1konobe in forum Excel General
    Replies: 3
    Last Post: 10-13-2013, 05:10 AM
  2. Covert last character in text to Uppper case
    By Aland2929 in forum Excel General
    Replies: 3
    Last Post: 03-15-2012, 12:25 PM
  3. Covert text to be a Formula
    By macky1730 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 07-22-2010, 03:46 AM
  4. Covert text to time
    By maverick_abhi in forum Excel General
    Replies: 8
    Last Post: 07-28-2006, 08:30 AM
  5. Covert text to Hyperlink
    By Eli Kedar in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 03-13-2006, 09:55 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