0
votes

I would like a reference sheet1("Index") having A:A (ID#) and B:B (Sheetname). This project has several sheets referenced on sheet1 B:B

For simplicity, sheet1 B:B will reference sheet2("Assets") or sheet3("Locations"). I want to return data from sheet2 or sheet3 depending on sheet1 B:B reference.

Sheet2("Assets") has A:A (ID#), B:B (Description), C:C more info and so on. Sheet3("Locations") has similar data as Sheet2.

Using vlookup I would like sheet1 B:B to direct vlookup to either sheet2 or sheet3.

Normally I would use vlookup table array as follows:

=VLOOKUP(A2,Assets!$B:$C,2,FALSE) or

=VLOOKUP(A2,Locations!$B:$C,2,FALSE)

On sheet1 I've unsuccessfully tried

=VLOOKUP(A2,B2 & !$B:$C,2,FALSE)

How can I use sheet1 vlookup to return data found on multiple sheets?

Another question, is there a simpler way to replace vlookup data errors with blank cell. This is the formula I use:

=IF(IFERROR(VLOOKUP(A2,Assets!$B:$C,2,FALSE),"")<>"",IFERROR(VLOOKUP(A2,Assets!$B:$C,2,FALSE),""),"")
1

1 Answers

0
votes

In C2 of your reference sheet, please try something like:

=VLOOKUP($A2,INDIRECT($B2&"!A:D"),COLUMN()-1,0)  

copied across and down to suit.