Help with INDIRECT and VLOOKUP

Thresh1642

New Member
Joined
Mar 14, 2017
Messages
11
Hi,

I am looking to do the following, but my excel-fu is weak....

I have twelve tabs, one for each month.
Each Tab contains a list of people, and the data pertaining to them, like the following

[TABLE="class: outer_border, width: 500"]
<tbody>[TR]
[TD]Name[/TD]
[TD]Nuts[/TD]
[TD]Bolts[/TD]
[TD]Widgets[/TD]
[TD]Objects[/TD]
[/TR]
[TR]
[TD]Bob[/TD]
[TD]12[/TD]
[TD]14[/TD]
[TD]6[/TD]
[TD]6[/TD]
[/TR]
[TR]
[TD]Ted[/TD]
[TD]11[/TD]
[TD]16[/TD]
[TD]5[/TD]
[TD]5[/TD]
[/TR]
[TR]
[TD]Amy[/TD]
[TD]9[/TD]
[TD]17[/TD]
[TD]12[/TD]
[TD]9[/TD]
[/TR]
[TR]
[TD]Jeff[/TD]
[TD]8[/TD]
[TD]7[/TD]
[TD]11[/TD]
[TD]8[/TD]
[/TR]
</tbody>[/TABLE]

In the 13th tab, I am creating a graph to compare the people and associated data, and the associated data is in a table as well. The table would look like the following:

[TABLE="class: grid, width: 500"]
<tbody>[TR]
[TD]Name[/TD]
[TD]Month[/TD]
[TD]Nuts[/TD]
[TD]Bolts[/TD]
[TD]Widgets[/TD]
[TD]Objects[/TD]
[/TR]
[TR]
[TD]Bob[/TD]
[TD]January[/TD]
[TD]?[/TD]
[TD]?[/TD]
[TD]?[/TD]
[TD]?[/TD]
[/TR]
[TR]
[TD]Bob[/TD]
[TD]April[/TD]
[TD]?[/TD]
[TD]?[/TD]
[TD]?[/TD]
[TD]?[/TD]
[/TR]
[TR]
[TD]Amy[/TD]
[TD]October[/TD]
[TD]?[/TD]
[TD]?[/TD]
[TD]?[/TD]
[TD]?[/TD]
[/TR]
[TR]
[TD]Jeff[/TD]
[TD]December[/TD]
[TD]?[/TD]
[TD]?[/TD]
[TD]?[/TD]
[TD]?[/TD]
[/TR]
</tbody>[/TABLE]


The problem I am running into is the formula needed to populate the cells with the '?' in them. I'm pretty sure its a combination of VLOOKUP (based on the Value in Name), and INDIRECT (based on the name of the table being referenced in Month), but I'm obviously missing something as my previous efforts have failed.

Any and all help appreciated!

Thanks,

Andrew
 

Excel Facts

Last used cell?
Press Ctrl+End to move to what Excel thinks is the last used cell.
the typical month tab


Book1
ABCDE
1NameNutsBoltsWidgetsObjects
2Bob121466
3Ted111655
4Amy917129
5Jeff87118
January



Book1
ABCDE
1NameNutsBoltsWidgetsObjects
2Bob24281212
3Ted22321010
4Amy18342418
5Jeff16142216
April



Book1
ABCDEF
1NameMonthNutsBoltsWidgetsObjects
2BobJanuary121466
3BobApril24281212
4AmyOctober917129
5JeffDecember16142216
Summary
Cell Formulas
RangeFormula
C2=VLOOKUP($A2,INDIRECT($B2&"!$A:$E"),MATCH(C$1,INDIRECT($B2&"!$A$1:$E$1"),0),0)
 
Upvote 0
Hi Tresh1642,

I assume tab names are January, February,... etc.

In cell C2 you should write and drag right and down, you should change references if you need.

=INDEX(INDIRECT($B2&"!$A$1:$E$25");MATCH($A2;INDIRECT($B2&"!$A$1:$A$25");0);MATCH(C$1;INDIRECT($B2&"!$A$1:$E$1");0))
 
Last edited:
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,183
Members
453,020
Latest member
Mohamed Magdi Tawfiq Emam

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top