If I have a cell, "a2
" which has part of a filename/filepath, "sheet2.xlsx
" in it which I want to use as a reference another workbook, how can I accomplish this?
I have tried using the INDIRECT
function but always get a reference error.
I am trying to find a way to summarize a list of spreadsheets with column a
containing the spreadsheet name and another column referencing a cell inside that respective sheet.
If the referenced workbook is open, then here is an example of getting a value from it:
where the components are like:
Note we have specified:
If the file is not open, you can still retrieve data with a ExecuteExcel4Macro (assuming you have a version of Excel that supports this function) For an example of this type of code, see:
Get Data from External Files