在跨单元格拖动时获取间接功能以更改范围

时间:2015-08-28 21:03:51

标签: excel excel-formula worksheet-function

在跨单元格拖动公式时,无法将AC2:AC150更改为AD2:AD150。主板上有一些略有类似的解决方案,但我在实施它们时遇到了麻烦。任何和所有的帮助表示赞赏。

=SUMIF(INDIRECT("'"&$A$3&"'!$a$2:$A$150"),$C18,INDIRECT("'"&$A$3&"'!Ac2:Ac150"))

1 个答案:

答案 0 :(得分:1)

Rather than having the string AC2:AC150 before the final brackets, try putting

ADDRESS(ROW(AC2),COLUMN(AC2),4)&":"&ADDRESS(ROW(AC150),COLUMN(AC150),4)

then when you drag the formula across it will change AC to AD and the ADDRESS function will pick up the new column number.