SUMPRODUCT&回合

时间:2017-10-28 17:22:33

标签: excel excel-formula excel-2010 rounding

根据superuser.com/questions

如何在求和之前将公式([DSW_INCLUDED] * Salary[InsuranceMultiplier])中以下两个数组的条件乘以向上舍入

=ROUND(SUMPRODUCT(([DSW_INCLUDED])*(Salary[Year]=Salary[@Year])*(Salary[Month]=Salary[@Month])*(Salary[InsuranceSituation]="Insured")*([DSW_LISTNO]=[@[DSK_LISTNO]]),(Salary[InsuranceMultiplier]))

作为Salary[InsuranceMultiplier] < 1

1 个答案:

答案 0 :(得分:0)

  

如何在求和之前将公式(...)中以下两个数组的条件乘以向上舍入

也许将ROUND更改为ROUNDUP并将其带入循环计算而不是将结果四舍五入。

=SUMPRODUCT((Salary[Year]=Salary[@Year])*(Salary[Month]=Salary[@Month])*(Salary[InsuranceSituation]="Insured")*([DSW_LISTNO]=[@[DSK_LISTNO]]),
            ROUNDUP([DSW_INCLUDED], 0), ROUNDUP(Salary[InsuranceMultiplier], 0))
'alternate
=SUMPRODUCT((Salary[Year]=Salary[@Year])*(Salary[Month]=Salary[@Month])*(Salary[InsuranceSituation]="Insured")*([DSW_LISTNO]=[@[DSK_LISTNO]]),
            ROUNDUP([DSW_INCLUDED]*Salary[InsuranceMultiplier], 0))