+ Reply to Thread
Results 1 to 4 of 4

Excel 2003 Macro to search for Zip Codes

  1. #1
    Registered User
    Join Date
    01-14-2009
    Location
    Ohio
    MS-Off Ver
    Excel 2003
    Posts
    3

    Excel 2003 Macro to search for Zip Codes

    I have a master list of over 1000 zip codes (5 digits max length) and delivery routes assigned to each zip code.

    I like to build a macro where you type in the zip code in a text box and click search.

    When it searches, i'd like it to bounce off the master list of 1000 zips and return the delivery territory.

    For example,

    If you type in 96634 - it would return CALIFORNIA

    I have very little VBA experience and dont know where to start. Thanks to everyone who can help!

  2. #2
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200
    You don't need VBA.Why not just use a VLOOKUP formula?
    Hope that helps.

    RoyUK
    --------
    For Excel Tips & Solutions, free examples and tutorials why not check out my web site

    Free DataBaseForm example

  3. #3
    Registered User
    Join Date
    01-14-2009
    Location
    Ohio
    MS-Off Ver
    Excel 2003
    Posts
    3
    Quote Originally Posted by royUK View Post
    You don't need VBA.Why not just use a VLOOKUP formula?
    that would work OK if I was the only one using it. I would like to send this file to multiple cities that ship our product. More for the end users to simply lookup a zip and know what route on the fly.

    Having a macro would simplify the need for a VLOOKUP - if it were just me VLOOKUP would be great.
    Last edited by kjwaller; 01-14-2009 at 01:06 PM. Reason: add attachment

  4. #4
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200
    Quote Originally Posted by kjwaller View Post
    that would work OK if I was the only one using it. I would like to send this file to multiple cities that ship our product. More for the end users to simply lookup a zip and know what route on the fly.

    Having a macro would simplify the need for a VLOOKUP - if it were just me VLOOKUP would be great.
    I don't follow your logic at all. A data validation list to select zip codes from with a VLOOKUP formula to return the results. What could be simpler? Look at the VLOOKUP example here

    http://www.excel-it.com/excel_functions.htm

    VBA alternative would mean that all users would need to enable macros, this might not be allowed by some IT departments & would need explaining to many users.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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