Excel-If range criteria met, sum all range that have been divided by 5 then round up

时间:2019-02-18 00:34:33

标签: excel-formula

Need your help on below.

screenshot

I would like to sum all the action count (the action count need to be divided 5 first then round up before summing it all up ) if criteria(Action type) is "A".

I tried to use the formula

=sumif(B2:B6,"A",roundup((A2:A6/5),0))

I tried to press ctrl+shift+enter to make it as a array formula but I prompt error. And the result I want is 4 from the above formula.And if the criteria change become "B" the result will be 5.

I tried to find a way in Google but unable to find any solution.

1 个答案:

答案 0 :(得分:1)

尝试使用旧样式(SUMIF之前的样式)的数组公式。

=SUM(IF(B2:B6="A", CEILING(A2:A6/5, 1)))

Finsih与CSE。