Bartosz Sosnowka
Bartosz Sosnowka

Reputation: 11

SUMPRODUCT with multiple criteria in one criteria range in matrix

How I can modify below SUMPRODUCT formula if I want to have sum from both column F (header column name "c") and column G (header column name "d"). The result should be 23 (11+12). In the formula I have only column F (header column name "c") for now.

=SUMPRODUCT(($B$3:$B$7=B8)*($C$3:$C$7=C8)*($D$2:$G$2=H2)*$D$3:$G$7)

Data print screen in link

Upvotes: 1

Views: 502

Answers (1)

Solver Max
Solver Max

Reputation: 391

You can add together the conditions you want, like:

=SUMPRODUCT(($B$3:$B$7=B8)*($C$3:$C$7=C8)*(($D$2:$G$2=H2)+($D$2:$G$2=H3))*$D$3:$G$7)

Upvotes: 1

Related Questions