英文:
referencing a sheet base on a cell value and its not working
问题
所以我需要根据单元格的值引用一个工作表。工作表的名称是PIER X4-320,我需要获取该工作表的E31单元格的值。工作表的名称在单元格A262中注册。因此,我使用了间接函数,
=INDIRECT(A262 & "!$E$31")
但是我一直收到这个代码的**#REF!**错误。我在这里做错了什么?
英文:
So i need to reference a sheet based on cell value. the sheet name is PIER X4-320 and i need to get the value of E31 of that sheet. The sheet name is registered in the cell A262. so i used the indirect function,
=INDIRECT(A262 & "! $E$31")
but i keep getting #REF! error with this code. What am i doing wrong here?
答案1
得分: 1
=INDIRECT("'"&A262&"'!$E$31")
英文:
As you have space in sheet name, you have to wrap the sheet name into single quote '
. Try-
=INDIRECT("'"&A262 & "'!$E$31")
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论