I have 2 workbooks and within each book, each sheet are the months of the year. The source book and target book have identical sheet names, eg. Aug 2019, Sep 2019..... I have created the following formula in the target book, cell B9, to pull a value from the source workbook, cell AJ46:
=INDEX('C:\FTPDownloads\Villa Stuff[Occupancy Chart Rev 1d.xlsx]Aug 2019'!$AJ$46,1)
It works fine, even with the source book closed.
In the target book I have loaded cell Q3 with the following formula :
=MID(CELL("filename",A1),FIND("]",CELL("filename",A1))+1,255)
This loads cell Q3 in the target book with the current active sheet. So cell Q3's value is Aug 2019. There are 20 copies of the INDEX formula in the target book, and the only thing that changes is the source cell at the end, which in the formula above is AJ46. To prevent constant changing of the INDEX formula when I extend the sheets to future months, I would like to use the value in cell Q3 in place of entering the actual sheet name. I have tried :
=INDEX('C:\FTPDownloads\Villa Stuff[Occupancy Chart Rev 1d.xlsx]"&Q3&"'!$AJ$46,1)
But it produces an error. I am using Excel 2007.