且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何在公式中动态设置选项卡名称?

更新时间:2023-01-05 09:58:47

尝试INDIRECT函数,如下所述: https://support.google.com/docs/answer/3093377?hl=zh_CN

Try the INDIRECT function, described here: https://support.google.com/docs/answer/3093377?hl=en

= INDIRECT($ A $ 1)

=INDIRECT($A$1)

为了被视为范围的引用,似乎INDIRECT需要将整个范围引用作为单个字符串.这为您提供了类似您问题的答案:

In order to be seen as a reference for the range, INDIRECT needs the entire range reference as a single string, it seems. This gives you something like the answer to your question:

= COUNTIF(INDIRECT(CONCATENATE($ A $ 1,!$ B7:$ B")),确定")

=COUNTIF(INDIRECT(CONCATENATE($A$1, "!$B7:$B")), "OK")

您所放弃的是地址的$ B7:$ B部分现在是一个字符串,因此,如果您在页面下复制此单元格,则7不会更新为8、9,依此类推. .

What you give up there is that the $B7:$B portion of your address is now a string, so if you copy this cell down the page, the 7 won't get updated to 8, 9, and so on.

可能还有其他功能组合可以使您更接近:这是我经过几分钟的搜索后得出的.

There may be other combinations of functions that will get you closer: this is the one I arrived at with a few minutes of searching.