[英]excel - Using the value from one cell to reference value in a different sheet
I'm trying to get the value in one cell to be used to reference another cell. 我正在尝试获取一个单元格中的值以用于引用另一个单元格。 So far what I've found is that the following formula should do the trick but somehow I can't get it to work. 到目前为止,我发现下面的公式应该可以解决问题,但是以某种方式我无法使它起作用。
In cell E5
I have the sheet name which is build up as XX-XX-XX-XX
in which the XX
's are all numerical values. 在E5
单元格中,我具有工作表名称,该工作表名称由XX-XX-XX-XX
,其中XX
均为数字值。
In another cell I want to have the data that's in cell D2
from the sheet 12-12-12-12
. 在另一个单元格中,我想获取工作表12-12-12-12
中的单元格D2
的数据。
I have tried the following formula but something doesn't seem to work: 我尝试了以下公式,但似乎无法正常工作:
=INDIRECT("'"&E5&"'!"&"D2")
If I check out the formula in error check it goes to this before it fails: 如果我检查出错误的公式,将在失败之前进行检查:
=INDIRECT("'12-12-12-12!D2")
Does anyone know a solution for this? 有谁知道解决方案吗?
=INDIRECT("'"&E5&"'"&"!D2")
或者如果您想要单元格引用与!分开
=INDIRECT("'"&E5&"'"&"!"&"D2")
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.