I am attempting to match data (state and year) in two tables that have the same h row and v column headers by using 2 drop list
[TABLE="class: cms_table_grid, width: 500"]
<tbody>[TR]
[TD]State[/TD]
[TD]Year[/TD]
[TD]Population[/TD]
[TD]Cases[/TD]
[/TR]
[TR]
[TD]Drop List[/TD]
[TD]Drop List[/TD]
[TD]Result From Table 1[/TD]
[TD]Result From Table 2[/TD]
[/TR]
</tbody>[/TABLE]
Both tables would look similar to the following:
Table 1 (Population)
[TABLE="class: cms_table_grid, width: 700"]
<tbody>[TR]
[TD]STATE[/TD]
[TD]1960[/TD]
[TD]1961[/TD]
[TD]1962[/TD]
[TD]1963[/TD]
[/TR]
[TR]
[TD]Alabama[/TD]
[TD]AAAAA[/TD]
[TD]BBBBB[/TD]
[TD]CCCCC[/TD]
[TD]DDDDD[/TD]
[/TR]
[TR]
[TD]Alaska[/TD]
[TD]EEEEE[/TD]
[TD]FFFFF[/TD]
[TD]GGGGG[/TD]
[TD]HHHHH[/TD]
[/TR]
[TR]
[TD]Arizona[/TD]
[TD]IIIII[/TD]
[TD]JJJJJ[/TD]
[TD]KKKKK[/TD]
[TD]LLLLL[/TD]
[/TR]
</tbody>[/TABLE]
Table 2 (Cases)
[TABLE="class: cms_table_grid, width: 700"]
<tbody>[TR]
[TD]STATE[/TD]
[TD]1960[/TD]
[TD]1961[/TD]
[TD]1962[/TD]
[TD]1963[/TD]
[/TR]
[TR]
[TD]Alabama[/TD]
[TD]AAAAA[/TD]
[TD]BBBBB[/TD]
[TD]CCCCC[/TD]
[TD]DDDDD[/TD]
[/TR]
[TR]
[TD]Alaska[/TD]
[TD]EEEEE[/TD]
[TD]FFFFF[/TD]
[TD]GGGGG[/TD]
[TD]HHHHH[/TD]
[/TR]
[TR]
[TD]Arizona[/TD]
[TD]IIIII[/TD]
[TD]JJJJJ[/TD]
[TD]KKKKK[/TD]
[TD]LLLLL[/TD]
[/TR]
</tbody>[/TABLE]
I need the 2 drop lists (State and Year) to pull data and match the desired cells (state and year) from each table into the corresponding cells (Population and cases). For example: Alaska and 1962 from both tables.
The code that I have in the cell "Result From Table 1" is - =VLOOKUP(B3,A12:CN62,HLOOKUP(C3,B10:CN11,2,FALSE),FALSE). That works the way it should.
The code that I have in cell "Result From Table 2" is - =VLOOKUP(B3,A79:CN129,HLOOKUP(C3,B77:CN77,2,FALSE),FALSE). This code give me the #REF! error.
How can I get my desired result in the cell "Result From Table 2"?
Please help. I thank you in advance.
[TABLE="class: cms_table_grid, width: 500"]
<tbody>[TR]
[TD]State[/TD]
[TD]Year[/TD]
[TD]Population[/TD]
[TD]Cases[/TD]
[/TR]
[TR]
[TD]Drop List[/TD]
[TD]Drop List[/TD]
[TD]Result From Table 1[/TD]
[TD]Result From Table 2[/TD]
[/TR]
</tbody>[/TABLE]
Both tables would look similar to the following:
Table 1 (Population)
[TABLE="class: cms_table_grid, width: 700"]
<tbody>[TR]
[TD]STATE[/TD]
[TD]1960[/TD]
[TD]1961[/TD]
[TD]1962[/TD]
[TD]1963[/TD]
[/TR]
[TR]
[TD]Alabama[/TD]
[TD]AAAAA[/TD]
[TD]BBBBB[/TD]
[TD]CCCCC[/TD]
[TD]DDDDD[/TD]
[/TR]
[TR]
[TD]Alaska[/TD]
[TD]EEEEE[/TD]
[TD]FFFFF[/TD]
[TD]GGGGG[/TD]
[TD]HHHHH[/TD]
[/TR]
[TR]
[TD]Arizona[/TD]
[TD]IIIII[/TD]
[TD]JJJJJ[/TD]
[TD]KKKKK[/TD]
[TD]LLLLL[/TD]
[/TR]
</tbody>[/TABLE]
Table 2 (Cases)
[TABLE="class: cms_table_grid, width: 700"]
<tbody>[TR]
[TD]STATE[/TD]
[TD]1960[/TD]
[TD]1961[/TD]
[TD]1962[/TD]
[TD]1963[/TD]
[/TR]
[TR]
[TD]Alabama[/TD]
[TD]AAAAA[/TD]
[TD]BBBBB[/TD]
[TD]CCCCC[/TD]
[TD]DDDDD[/TD]
[/TR]
[TR]
[TD]Alaska[/TD]
[TD]EEEEE[/TD]
[TD]FFFFF[/TD]
[TD]GGGGG[/TD]
[TD]HHHHH[/TD]
[/TR]
[TR]
[TD]Arizona[/TD]
[TD]IIIII[/TD]
[TD]JJJJJ[/TD]
[TD]KKKKK[/TD]
[TD]LLLLL[/TD]
[/TR]
</tbody>[/TABLE]
I need the 2 drop lists (State and Year) to pull data and match the desired cells (state and year) from each table into the corresponding cells (Population and cases). For example: Alaska and 1962 from both tables.
The code that I have in the cell "Result From Table 1" is - =VLOOKUP(B3,A12:CN62,HLOOKUP(C3,B10:CN11,2,FALSE),FALSE). That works the way it should.
The code that I have in cell "Result From Table 2" is - =VLOOKUP(B3,A79:CN129,HLOOKUP(C3,B77:CN77,2,FALSE),FALSE). This code give me the #REF! error.
How can I get my desired result in the cell "Result From Table 2"?
Please help. I thank you in advance.