Reputation: 33
I currently have this kind of Function :
=VLOOKUP(A6&Values!$A$6,'pathToMyFile]Sheet1'!$A:$I,5,FALSE)
And i'd like to create a kind of variable in another sheet(as for 'Values!$A$6') but for my path to file like :
=VLOOKUP(A6&Values!$A$6,'Values!$A$8'!$A:$I,5,FALSE)
The aim is that for futher KPI calculation the only parameter to change is the name of the document in a single cell.
any advice or tips or even solution?
Upvotes: 2
Views: 857
Reputation: 44
Suppose you have 3 sheets:
So for example, sheet=March includes:
We can reference in the sheet 'Overview' to the other sheets (i.e. March and April) using the following VLOOKUP formula:
=VLOOKUP(A5,INDIRECT($B$2&"!A:B"),2,FALSE)
... where A5 is the product (Product A, Product B, ...) you are looking for, $B$2 is the dynamic reference cell where you can (e.g. using a dropdown-list) select a month (March, April) and 2 indicates the second column (i.e. the 'Discount' column) and FALSE to 'Exact match'.
Note : The function INDIRECT() only works (1) within the workbook or (2) with workbooks that are open during the calculation time. If the external workbook is closed, it will result in a #REF! error.
Hope this helps!
Upvotes: 0