Forum Discussion
kczyzyk
Nov 16, 2021Copper Contributor
Reference a cell to grab the sheet name for another cell reference?
I want to use a cell in the current workbook to reference a cell in another workbook. Essentially I have a lot of copies of the same formatted data and I'm trying to compile a summary. Is there a wa...
- Nov 16, 2021
If you mean that you want to reference a cell in another sheet in the same workbook, you can use the INDIRECT function:
=INDIRECT("'"&H2&"'!L11")
This can be filled to the right.
MattWaters
Jan 05, 2023Copper Contributor
Awesome thanks! kczyzyk
Is it possible to hard code the workbook name, but reference the sheet name via indirect possible?
I've tried it along the lines of:
=INDIRECT('[workbook.xls]"&H2&"'!L11)
But can only make it work if I reference both the sheet and the workbook withing the indirect function. Trying to get around it not working if the workbook is closed, as the workbook name will always remain constant.
Hope that makes sense
HansVogelaar
Jan 06, 2023MVP
It won't work with a closed workbook, even if that is always the same workbook. You'll have to open it in Excel.