问题描述
我有一个包含52个标签的文档,每个星期有一个.他们被命名周(1),...,周(52)
.在第53个标签中,我汇总了输入到每个标签中的数据.
I have a document that has 52 tabs, one for each week. They're named Week (1), ...,Week (52)
. In the 53rd tab, I have a summary of the data inputted into every tab.
这个想法是我的主管每周复制和粘贴数据,并在该周完成时隐藏该标签,而第53个摘要页将显示每周细分的整个年度.
The idea is that my supervisor copies and pastes data per week, hiding the tab as she completes that week, and the 53rd summary page will show the entire year broken down per week.
我的问题是,其中一个单元格的公式为 = SUMIF('Week(1)'!$ B:$ B,B3,'Week(1)'!$ G:$ G)
的目的是为每个条目将第(1)周中的G列加起来,其中B3等于同一行中第(1)周中的B列中的相应单元格.
My problem is, the formula for one of the cells is =SUMIF('Week (1)'!$B:$B,B3,'Week (1)'!$G:$G)
where the point is to add up the column G in Week (1) for each entry where B3 equals the corresponding cell in Week (1) column B on the same row.
由于我已将其复制了52次,所以通常我必须手动将每个标签输入各种不同的公式中,将Week(1)替换为Week(2),依此类推,直到周(52).
Since I have this copied 52 times, I would ordinarily have to manually enter each tab into the various different formulas, replacing Week (1) with Week (2), etc and so forth until Week (52).
是否可以使用以下公式代替
Is there a way to instead have the following formula:
= SUMIF('[引用包含标签名称的细胞]'!$ B:$ B,B3,'[[REFERENCE]'!$ G:$ G)
推荐答案
使用 INDIRECT
,您可以使用单元格值创建图纸参考.而不是图片中的示例:
By using INDIRECT
you can create a sheet reference using a cell value. Instead of your example in the picture:
= SUMIF('[E1] 1!$ B:$ B,F3,'[E3]'!$ G:$ G)
您可以使用:
= SUMIF(INDIRECT('"& E1&'!$ B:$ B"),F3,INDIRECT('"& E3&'!$ G:$ G"))
这篇关于使用Excel单元格引用来指示公式中的选项卡名称?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!