Excel Copy/Search/Paste Help Needed ASAP!

N

NWill

I have two worksheets. Worksheet A is the file I'm currently enterin
data into. Worksheet B is completed and features every zip code in th
US in column 1 and the closest large city corresponding to each zip cod
in column 7. I have the zip codes (which I am entering into column 1 o
Wksheet A), but have to search (Ctrl+F) Wksheet B with each zip code, g
to the found zip code, scroll over 6 columns, copy the city name, the
paste that into column 2 of Wksheet A. I am hoping there's a way t
make a macro for this, but can't figure out how to make it work with
different zip code every time. Can anyone figure this out??? I hav
2,000 of these to do and going back and forth is killing me
literally.

If it's helpful, what I've been doing is
1)entering a zip code into col.1 of Wksheet A
2)copy that zip
3)activate Wksheet B and Ctrl+F to bring up Find feature
4)paste zip code into Find feature and hit enter
5)go to designated row with correct zip, then find the correspondin
city (same row as "found zip", but in column 7)
6)copy the corresponding city out of col. 7 of Wksheet B
7)Activate Wksheet A and paste the city name into col.2 of Wksheet A

Row after row of this is making me nuts..
 
T

Tom Ogilvy

=vlookup(A1,'wksheet B'!$A$1:$G$5000,7,False)

Assumes the city names are in G
if they are in F change 7 to 6

Now drag fill the formula down the column.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top