0

I have a couple of different tables defined in Excel 2016 with identical layout, based on Name as the left-most key field. I am doing VLOOKUP against those tables based on the Name in a different table, which has FieldName and TableName columns, which I am supposed to use to search in the right place. So currently, I have code which looks like this:

VLOOKUP([@FieldName], IF([@TableName]="Static", Static, Dynamic), 2, FALSE)

And this works great when you only have 2 tables to search in, Static and Dynamic. However, when you have 5 or 6 of them, writing a string of nested IF does not result in a readable solution.

Is there a function I can call to transform the string value in TableName into an actual table reference? If not, is there any other way to do the same thing if I would like to stay out of VBA if at all possible.

Thank you very much

gt6989b
  • 4,125
  • 8
  • 46
  • 64

0 Answers0