How to write a macro to match up zip codes to a number?

Need a macro to match up zip codes to a number. The list zips below needs to match the zone number.
Zip           Zone
60610      1
60612      1
60622      1
60642      1
60629      2
60638      2
60652      2
60655      2
60621      3
60628      3
60643      3
60649      3
60617      4
60633      4
60827      4

On my work sheet the Zip is in column J and the Zone is in column W.
Thanks,
Jimi
Jimi ShermanAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

tel2Commented:
Hi Heyjimi,

Do you need this written as a macro?  Is there some reason why you can't just use Excel's VLOOKUP function?  Have a look at the help on VLOOKUP if you don't already know how it works, and get back to us.

tel2
0
Jimi ShermanAuthor Commented:
Hi tel2,
You are right VLOOKUP is what I need...but I will be doing this many times in a week so a macro would be the best without human errors.
0
tel2Commented:
What output do you want, Heyjimi?  Lay it out for us.
0
Determine the Perfect Price for Your IT Services

Do you wonder if your IT business is truly profitable or if you should raise your prices? Learn how to calculate your overhead burden with our free interactive tool and use it to determine the right price for your IT services. Download your free eBook now!

Jimi ShermanAuthor Commented:
Not sure what you mean "output"?
The VLOOKUP macro will be part of another macro...does that help?

Jimi
0
tel2Commented:
So given a specific Zip, you want the macro to return the related Zone, right?
How do you want it to work, exactly?  Where does the user put the Zip and where should the macro return the Zone to?
0
Jimi ShermanAuthor Commented:
Right.
The all the Zip codes are in column J already the Zone is column W and it is blank.
0
Jimi ShermanAuthor Commented:
Here is the file attached.
03-City-Non-Pay-WIP-2013-9-20.xlsx
0
tel2Commented:
I suggest you just add VLOOKUP formulas to column W, to pick up the Zone from the "Zip Count" sheet, based on the Zip for each row.  If you don't want that answer, let's see if someone else can write you a macro, as I'm not very good at them and don't have the time at present, sorry.
0
Jimi ShermanAuthor Commented:
Ok because I need this done quickly can you give me the VLOOKUP formulas?
0
Jimi ShermanAuthor Commented:
Forgot to say that I will give you the points.
Thanks
0
tel2Commented:
On the WIP sheet, put this in cell W2:
    =VLOOKUP(J2,'Zip Count'!E$2:F$16,2)
The copy it down as far as required.

Make sure you COPY and PASTE it from above, so you don't get any typos.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Jimi ShermanAuthor Commented:
Thanks
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Visual Basic Classic

From novice to tech pro — start learning today.