当工作表名称是单元格的值时,如何引用另一个工作表的单元格? [英] How to make a reference to a cell of another sheet, when the sheet name is the value of a cell?

查看:23
本文介绍了当工作表名称是单元格的值时,如何引用另一个工作表的单元格?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在 excel 2007 中,我在单元格中有一个公式,如下所示:

In excel 2007, I have a formula in a cell like the following:

=COUNTIFS('2008-10-31'!$C:$C;">="&'$A7)

现在我想让工作表的名称('2008-10-31')依赖于某个单元格的值(比如 A1).类似的东西:

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

有没有办法做到这一点?还是我必须为它编写一个 VBA 宏?

Is there is way to do this? Or do I have to write a VBA-Macro for it?

推荐答案

INDIRECT 做你想做的事.注意如果sheet名称有空格,需要用单引号括起来,即

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屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆