Looking up worksheets for values

F

fifi

I have two worksheetsa with information that is the same but the text
is same
foe example
worksheet 1 has a column of countries e.g United Kingdom
Worksheet 2 has a column of countries abbreviations e.g UK (aswell as
other info e.g population, size etc)
and i have worksheet 3 which has two rows e.g United Kingdom and
UK...im using this as a translation table to find UK from United
Kingdom in 1st worksheet
can anyone help me...i wana create a macro to loop through the
countries column in worksheet 1, search through the translation table
(worksheet3) to get the abbreviation and then search worksheet 2 for
this to copy some info from that row back into worksheet1....if any of
this makes sense!!
 
P

paul

a non macro way if you have only one instance of each counry,and if you can
insert a column
insert a column to the right of your abreviation column
in the top row =vlookup(abbreviation,sheet3!list,2,false) and copy down
this should fill in the new column
copy and paste special on top of itself
do a vlookup now on the proper name and have several v lookups corresponding
to the columns you want going across the page
 
G

Gloria Thrurk

You seem to think that everything should be done with macros.
Excel is smarter than that.

I think this particular problem could be solved using the Vlookup function.
Your description of the problem makes sense, but Excel doesn't need a macro
to do that.
The Vlookup function can scan through a list without a macro.
That's what it's there for.

But even better than that, use the External Data wizard and MSQuery, bundled
with Excel, to join the 3 tables.
And extract your results with a pivot table.
But that's a bit more advanced.
Start with the easy stuff.

Gloria.
 

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