Hi Sam,
I got this from Peo Sjoblom some time ago. Even with some e-mailed details
on how it works I cannot figure it all out. The example he sent me covered
8 worksheets, but that is just a matter of number of sheets you list in the
named range MySheets. The first formula is the original from Peo, the
second is the same which I modified to trap errors and return "".
The first one looks up the value of A2 on the main sheet and searches all
sheet names in MySheets A2:A200 in each and returns the third column value.
The second one does essentially the same thing with error trapping and looks
up the value in C3 and returns column 2 value.
You will need to make a list of all the sheets you want to look up and name
it MySheets (or whatever, if other than MySheets then use your name in the
formula instead of MySheets).
Of course adjust the ranges to suit your sheet needs.
Use Ctrl+Shift+Enter to commit the formula. (Array Enter)
=VLOOKUP(A2,INDIRECT("'"&INDEX(MySheets,MATCH(1,--(COUNTIF(INDIRECT("'"&MySheets&"'!A2:A200"),A2)>0),0))&"'!A2:C200"),3,0)
=IF(ISNA(VLOOKUP(C3,INDIRECT("'"&INDEX(MySheets,MATCH(1,--(COUNTIF(INDIRECT("'"&MySheets&"'!A2:F58"),C3)>0),0))&"'!A2:F58"),2,0)),"",VLOOKUP(C3,INDIRECT("'"&INDEX(MySheets,MATCH(1,--(COUNTIF(INDIRECT("'"&MySheets&"'!A2:F58"),C3)>0),0))&"'!A2:F58"),2,0))
Looks a bit intimidating but works great.
HTH
Regards,
Howard