1
votes

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

1

1 Answers

1
votes

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)