helamansanchez
New Member
- Joined
- Aug 3, 2018
- Messages
- 4
Quick question regarding some references I have to external workbooks.
The formula in question is:
The problem I keep running into is that this VLOOKUP function returns #REF unless the workbook that it is pulling from (in the example I used above, this would be the workbook called Summary Customer1 2016) is open.
The value of cell C4 in the Links to Workbooks tab also appears as #REF .
I have a vague idea that the issue might have to do with the INDIRECT function that I use both in cell C4 and in my VLOOKUP formula, but I don't know why or how to work around it.
Any ideas are appreciated
The formula in question is:
Code:
=VLOOKUP("*"&B5,INDIRECT('Links to Workbooks'!$I$3),'Links to Workbooks'!$C$4,FALSE)
- Where the lookup value B5 contains "Total Revenue" and is what I am hoping to match using VLOOKUP in other files;
- 'Links to Workbooks'!$I$3 contains a CONCATINATE function linking together the file path name for the workbook from which to pull data based off of:
- C3, which returns a certain customer name depending on which program is chosen from a dropdown menu (see below)
- Summary!C2, which has a dropdown menu to choose which year we want to look at
- Summary!B2, which has a dropdown menu to choose which program we want to look at, and determines the value of C3 (above)
So, the function
returns the value
Code:
=CONCATENATE("'C:\Users\zjf62t\Documents\Program Profitability\1 Summary\[Summary ",C3," ",Summary!C2,".xlsx]",Summary!B2,"'!$B$1:$JZ$100")
if we have selected Program1 for Customer1 for the year 2016 as the parameters to analyze;'C:\Users\zjf62t\Documents\Program Profitability\1 Summary\[Summary Customer1 2016.xlsx]Program1!$B$1:$JZ$100
- 'Links to Workbooks'!$C$4 is
Code:
=MATCH(A4,INDIRECT(I2),0)-1
which takes the phrase in A4 specifying whether we are looking for a specific month or the YTD where
- I2 is a CONCATENATE function very similar to the one I described for cell I3 above, which returns the exact same file path, simply with the range at the end changed to include only the top row of the table
This returns the column to look for in the VLOOKUP
The problem I keep running into is that this VLOOKUP function returns #REF unless the workbook that it is pulling from (in the example I used above, this would be the workbook called Summary Customer1 2016) is open.
The value of cell C4 in the Links to Workbooks tab also appears as #REF .
I have a vague idea that the issue might have to do with the INDIRECT function that I use both in cell C4 and in my VLOOKUP formula, but I don't know why or how to work around it.
Any ideas are appreciated