使用单元格中的字符串值来访问同名的工作表 [英] Use string value from a cell to access worksheet of same name
问题描述
我有2个工作表:摘要
和 SERVER-ONE
。
在摘要工作表中的单元格 A5
中,我添加了值 SERVER-ONE
。
旁边,在单元格 B5
中,我想要一个使用中的值的公式A5
在相同名称的工作表中显示 G7
的值( SERVER-ONE
)。
我可以手动使用:
='SERVER -ONE'!G7
然而,我希望这是动态的,所以我可以轻松添加更多的工作表
我没有喜悦地尝试了这个明显的例子:
=' A5'!G7
任何建议?
您可以使用公式 INDIRECT()
。
取一个字符串并将其视为参考。在你的情况下,你可以使用:
= INDIRECT('&&G $ b
双引号表示内部是字符串,只有 A5
这里是一个参考。
I have 2 worksheets: Summary
and SERVER-ONE
.
In cell A5
on the Summary worksheet, I have added the value SERVER-ONE
.
Next to it, in cell B5
, I would like a formula that uses the value in A5
to display the value of G7
in the worksheet of the same name (SERVER-ONE
).
I could manually use:
='SERVER-ONE'!G7
However I would like this to be dynamic, so I can easily add more worksheets.
I tried the obvious with no joy:
='A5'!G7
Any suggestions?
You can use the formula INDIRECT()
.
This basically takes a string and treats it as a reference. In your case, you would use:
=INDIRECT("'"&A5&"'!G7")
The double quotes are to show that what's inside are strings, and only A5
here is a reference.
这篇关于使用单元格中的字符串值来访问同名的工作表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!