Multiple SUMPRODUCT

C

catlair

Hi,

Wondering if there is an easier way or a "summarize" version to use the
SUMPRODUCT for multiple values. For example,

(SUMPRODUCT(--($A$2:$A$170="AP"),--($D$2:$D$170>=7),--($G$2:$G$170="Reactive"),--($K$2:$K$170="ID")))
+(SUMPRODUCT(--($A$2:$A$170="AP-HOME"),--($D$2:$D$170>=7),--($G$2:$G$170="Reactive"),--($K$2:$K$170="ID")))
+(SUMPRODUCT(--($A$2:$A$170="AP-INT"),--($D$2:$D$170>=7),--($G$2:$G$170="Reactive"),--($K$2:$K$170="ID")))

I can't seem to make the "AP", "AP-HOME" & "AP-INT" values work in one
SUMPRODUCT equation.
 
J

JE McGimpsey

catlair said:
Wondering if there is an easier way or a "summarize" version to use the
SUMPRODUCT for multiple values. For example,

(SUMPRODUCT(--($A$2:$A$170="AP"),--($D$2:$D$170>=7),--($G$2:$G$170="Reactive")
,--($K$2:$K$170="ID")))
+(SUMPRODUCT(--($A$2:$A$170="AP-HOME"),--($D$2:$D$170>=7),--($G$2:$G$170="Reac
tive"),--($K$2:$K$170="ID")))
+(SUMPRODUCT(--($A$2:$A$170="AP-INT"),--($D$2:$D$170>=7),--($G$2:$G$170="React
ive"),--($K$2:$K$170="ID")))

One way:

=SUMPRODUCT((($A$2:$A$170="AP") + ($A$2:$A$170="AP-HOME") +
($A$2:$A$170="AP-INT")), --($D$2:$D$170>=7), --($G$2:$G$170="Reactive"),
--($K$2:$K$170="ID"))

Note that, since the first terms are added, no double negative is needed.


Alternatively, if any string starting with AP should be summarized:

=SUMPRODUCT(--(LEFT($A$2:$A$170,2)="AP") --($D$2:$D$170>=7),
--($G$2:$G$170="Reactive"), --($K$2:$K$170="ID"))
 
C

catlair

Cool! Thanks!

JE said:
One way:

=SUMPRODUCT((($A$2:$A$170="AP") + ($A$2:$A$170="AP-HOME") +
($A$2:$A$170="AP-INT")), --($D$2:$D$170>=7), --($G$2:$G$170="Reactive"),
--($K$2:$K$170="ID"))

Note that, since the first terms are added, no double negative is needed.


Alternatively, if any string starting with AP should be summarized:

=SUMPRODUCT(--(LEFT($A$2:$A$170,2)="AP") --($D$2:$D$170>=7),
--($G$2:$G$170="Reactive"), --($K$2:$K$170="ID"))
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top