I need to count not only by item no but also color. In the following example, the desired result is in blue. Row 5 and 6 have the same item number and color. Thus, the sum is 22 (16+6). The closest thing I can get is with the following formula, whose result is in the last column. It seems I need a filter to filter off 22 and 31 in red. How?
=SUMIFS($D$2:$D$168,$B$2:$B$168,"="&B2,$C$2:$C$168,"="&C2)
[TABLE="width: 250"]
<tbody>[TR]
[TD]89219 MOD
[/TD]
[TD]WHITE[/TD]
[TD]16[/TD]
[TD]16[/TD]
[TD]16
[/TD]
[/TR]
[TR]
[TD]89228 MOD[/TD]
[TD]GOLD[/TD]
[TD]1[/TD]
[TD]1[/TD]
[TD]1[/TD]
[/TR]
[TR]
[TD]89228 MOD[/TD]
[TD]PLATINUM[/TD]
[TD]6[/TD]
[TD]6[/TD]
[TD]6[/TD]
[/TR]
[TR]
[TD]89228 MOD[/TD]
[TD]WHITE[/TD]
[TD]6[/TD]
[TD]6[/TD]
[TD]6[/TD]
[/TR]
[TR]
[TD]89320 MOD[/TD]
[TD]BLACK[/TD]
[TD]16[/TD]
[TD]0[/TD]
[TD]22[/TD]
[/TR]
[TR]
[TD]89320 MOD[/TD]
[TD]BLACK[/TD]
[TD]6[/TD]
[TD]22[/TD]
[TD]22[/TD]
[/TR]
[TR]
[TD]89320 MOD[/TD]
[TD]CREAM[/TD]
[TD]16[/TD]
[TD]0[/TD]
[TD]31[/TD]
[/TR]
[TR]
[TD]89320 MOD[/TD]
[TD]CREAM[/TD]
[TD]15[/TD]
[TD]31
[/TD]
[TD]31[/TD]
[/TR]
[TR]
[TD]89320 MOD[/TD]
[TD]WHITE[/TD]
[TD]10[/TD]
[TD]10[/TD]
[TD]10[/TD]
[/TR]
[TR]
[TD]89320 MOD[/TD]
[TD][/TD]
[TD]17[/TD]
[TD]17[/TD]
[TD]17[/TD]
[/TR]
[TR]
[TD]89330 MOD[/TD]
[TD][/TD]
[TD]1[/TD]
[TD]1[/TD]
[TD]1[/TD]
[/TR]
</tbody>[/TABLE]
=SUMIFS($D$2:$D$168,$B$2:$B$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