Linking Data - Lookup tables

  • Thread starter Thread starter bgrasty
  • Start date Start date
B

bgrasty

This likely is a very basic question, however....

I can organize this within one sheet, or by multiple sheets
workbooks, whatever, but all attemps at 3-d categorical consolidation
joining, or relating have failed. Any recommendation on best solutio
would be great.

At the basic level, column one is a set of repeating numeric codes.
need to populate column 2 with attributes from a separate data set (
consider this a lookup table) having one unique value in column
(which are to be used to "link" to the first dataset), and the "lookup
codes to be inserted in dataset one, column 2.

dataset 1 dataset 2
column1 column1 column2
1 1 blue
2 2 red
10 .
12 .
97 .
16 .
14 .
12 .
97 .
16 100 magenta

I do this regularly with other software, but cannot easily export.

Thanks for any help.

bl
 
blg,

This would be less ambiguous if you had names for these fields. I think
VLOOKUP is what you need.

=VLOOKUP(A2, Dataset2, 2, FALSE)

This will look down column 1 of Dataset2, and return what's in the second
column. Copy the formula down. The FALSE argument ensures that in-between
values aren't considered a hit when looking for the field in dataset 2.
 
Hi

if i'm understanding correctly use the VLOOKUP function
=VLOOKUP(cell_reference_of_first_item_in_dataset1,range_of_the_two_dataset2_
columns,2,0)

e.g. if your dataset2 was on Sheet2 from A2 to B101 and dataset 1 was on
sheet1 column A starting at cell A2, in B2 sheet1 type
=VLOOKUP(A2,Sheet2!$A$2:$B$101,2,0)
then copy down column B of Sheet1

Hope this helps
Cheers
JulieD
 
Back
Top