如何更改间接公式的参考

时间:2019-05-09 11:13:52

标签: excel excel-formula

我正在使用一份报告,以了解每人每小时要处理多少个单位。目前,我仅每2小时收到一次数字,因此我在使用以下内容。

=AB15/SUM(COUNTIF(INDIRECT({"G15","D15","J15","M15","P15","S15","V15","Y15"}),">0"))/2

这给了我,处理的单位总数除以包含值大于零(工作小时数)的像元数,然后除以2得到小时数。

当我向下拖动公式时,引用不会改变,我希望它显示如下。

=AB16/SUM(COUNTIF(INDIRECT({"G16","D16","J16","M16","P16","S16","V16","Y16"}),">0"))/2 =AB17/SUM(COUNTIF(INDIRECT({"G17","D17","J17","M17","P17","S17","V17","Y17"}),">0"))/2

1 个答案:

答案 0 :(得分:0)

我认为您可能使它有些复杂了。请注意,这些单元格之间有两列常量。该公式将执行相同操作,并且可以将其向下拖动:

=AB15/SUMPRODUCT((D15:Y15>0)*(MOD((COLUMN(D15:Y15)-1)/3,1)=0))/2