当表单名称是单元格的值时,如何引用另一个单元格的单元格? [英] How to make a reference to a cell of another sheet, when the sheet name is the value of a cell?
本文介绍了当表单名称是单元格的值时,如何引用另一个单元格的单元格?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
= COUNTIFS('2008-10- 31'!$ C:$ C;> =&'$ A7)
我想使表格的名称('2008-10-31')取决于某个单元格的值(如A1)。如下:
= COUNTIFS(A1!$ C:$ C;> =&'$ A7)/ / error
有没有办法做到这一点?或者我必须为它编写一个VBA-Macro?
解决方案
INDIRECT做你想要的请注意,如果工作表名称有空格,则需要将单引号括起来,即
= COUNTIFS(INDIRECT( '&'$ C:$ C);> =& $ A7)
In excel 2007, I have a formula in a cell like the following:
=COUNTIFS('2008-10-31'!$C:$C;">="&'$A7)
Now I want to make the name of the sheet ('2008-10-31') be dependent on the value of some cell (say A1). Something like:
=COUNTIFS(A1!$C:$C;">="&'$A7) // error
Is there is way to do this? Or do I have to write a VBA-Macro for it?
解决方案
INDIRECT does what you want. Note that if the sheet name has any spaces, you need to put single quotes round it, ie
=COUNTIFS(INDIRECT("'" & A1 & "'!$C:$C"); ">=" & $A7)
这篇关于当表单名称是单元格的值时,如何引用另一个单元格的单元格?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文