ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Looking up worksheets for values (https://www.excelbanter.com/excel-worksheet-functions/106846-looking-up-worksheets-values.html)

fifi

Looking up worksheets for values
 
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!!


paul

Looking up worksheets for values
 
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
--
paul

remove nospam for email addy!



"fifi" wrote:

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!!



Gloria Thrurk

Looking up worksheets for values
 
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.






"fifi" a écrit dans le message de news:
...
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!!





All times are GMT +1. The time now is 02:28 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com