+ Reply to Thread
Results 1 to 8 of 8

Type in Zip, have state and city inserted

  1. #1
    Registered User
    Join Date
    03-19-2012
    Location
    North Carolina
    MS-Off Ver
    Excel 2003
    Posts
    4

    Type in Zip, have state and city inserted

    I have a lengthy list zip codes, state and city, commonly used by my company. I am currently typing in each one in each cell. I have the list saved in excel. Explain this to me like I'm stupid. How can I tell Column D, that when I type in "28734" that I want Column E to say "Franklin", and column F to say "NC"? Thanks!

  2. #2
    Valued Forum Contributor
    Join Date
    03-14-2012
    Location
    Arizona USA
    MS-Off Ver
    Excel 2000/2007
    Posts
    408

    Re: Type in Zip, have state and city inserted

    With macros, this is fairly simple.

    A couple questions;
    1. On the data entry side, are you entering more than one zip code(normally entered row by row) at a time?

  3. #3
    Registered User
    Join Date
    03-19-2012
    Location
    North Carolina
    MS-Off Ver
    Excel 2003
    Posts
    4

    Re: Type in Zip, have state and city inserted

    No, not more than one at a time. Here is what the normal row reads: A1: Doe, A:2 John, A:3 PO Box 1, A:4 Franklin, A:5 NC, A:6 28734
    B1: Doe, B:2 Jane, B:3 PO Box 2, B:4 Sylva, B:5 NC, B:6 28779.


    So, the column on the spreadsheet has multiple zips. What I'm after is to type the zip, then have the state and city pop in the next two cells.

  4. #4
    Forum Expert Domski's Avatar
    Join Date
    12-14-2009
    Location
    A galaxy far, far away
    MS-Off Ver
    Darth Office 2010
    Posts
    3,950

    Re: Type in Zip, have state and city inserted

    I'm assuming you should be able to do this using VLOOKUP. The syntax would be =VLOOKUP(A6,Sheet2!$A$1:$C$2000,2,FALSE) Where A1:C2000 on Sheet2 is your table of zip codes it will return the item from the column B if it finds an exact match in column A of the value in A6.

    Dom
    "May the fleas of a thousand camels infest the crotch of the person who screws up your day and may their arms be too short to scratch..."

    Use code tags when posting your VBA code: [code] Your code here [/code]

    Remember, saying thanks only takes a second or two. Click the little star to give some Rep if you think an answer deserves it.

  5. #5
    Registered User
    Join Date
    03-19-2012
    Location
    North Carolina
    MS-Off Ver
    Excel 2003
    Posts
    4

    Re: Type in Zip, have state and city inserted

    Okay... I'm going to give you some specific information, and maybe you can give me a detailed syntax, as I am not very good with them.

    The worksheet upon which my large list of customers is located is named "1000+", on another worksheet is my list of Zips and towns named "Zips".

    In "1000+", all of the zip codes are typed in column K. All of the towns are typed in column L. In "Zips" all of the zip codes are typed into column A, and all of the correlating towns are typed into column B.

    What would the specific syntax be for that scenario? I'm sorry to sound so stupid, but I pretty much am. Ha!

  6. #6
    Forum Expert Domski's Avatar
    Join Date
    12-14-2009
    Location
    A galaxy far, far away
    MS-Off Ver
    Darth Office 2010
    Posts
    3,950

    Re: Type in Zip, have state and city inserted

    The best way to demonstrate the correct syntax would be to work with a sample file if you could provide one.

    Dom

  7. #7
    Registered User
    Join Date
    03-19-2012
    Location
    North Carolina
    MS-Off Ver
    Excel 2003
    Posts
    4

    Re: Type in Zip, have state and city inserted

    I can do that... If I can figure out how to attach a file to a post. Ha! I think thats got it. Ha!
    Attached Files Attached Files

  8. #8
    Forum Contributor
    Join Date
    01-28-2010
    Location
    Riverside, CA
    MS-Off Ver
    Excel 2010
    Posts
    132

    Re: Type in Zip, have state and city inserted

    in F2 enter:
    Please Login or Register  to view this content.
    When you add state column in zips sheet (column D)

    in H2 enter:
    Please Login or Register  to view this content.
    afterwards, copy down the column
    Happy Excel'ing!

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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