From: TeeJ on
I have the following formula
SUMIFS(Costs!$E$22:$E$60,Costs!$D$22:$D$60,Summary!$A7,Costs!$C$22:$C$60,Summary!D$3)
, used in an Excel 2007 spreadsheet. I'm trying to rewrite it as a
SUMPRODUCT of SUMIF with no luck. Can anyone steer me in the right direction?
From: Dave Peterson on
=sumproduct(--(costs!$d$22:$d$60=summary!$a7),
--(costs!$c$22:$c$60=summary!d$3),
(costs!$e$22:$e$60))

Adjust the ranges to match--but you can't use whole columns (except in xl2007+).

=sumproduct() likes to work with numbers. The -- stuff changes trues and falses
to 1's and 0's.

Bob Phillips explains =sumproduct() in much more detail here:
http://www.xldynamic.com/source/xld.SUMPRODUCT.html

And J.E. McGimpsey has some notes at:
http://mcgimpsey.com/excel/formulae/doubleneg.html

TeeJ wrote:
>
> I have the following formula
> SUMIFS(Costs!$E$22:$E$60,Costs!$D$22:$D$60,Summary!$A7,Costs!$C$22:$C$60,Summary!D$3)
> , used in an Excel 2007 spreadsheet. I'm trying to rewrite it as a
> SUMPRODUCT of SUMIF with no luck. Can anyone steer me in the right direction?

--

Dave Peterson
From: TeeJ on
Figured it out - it should be:
=SUMPRODUCT(Costs!$E$22:$E$60,(Costs!$D$22:$D$60=Summary!$A7)*(Costs!$C$22:$C$60=Summary!D$3))

"TeeJ" wrote:

> I have the following formula
> SUMIFS(Costs!$E$22:$E$60,Costs!$D$22:$D$60,Summary!$A7,Costs!$C$22:$C$60,Summary!D$3)
> , used in an Excel 2007 spreadsheet. I'm trying to rewrite it as a
> SUMPRODUCT of SUMIF with no luck. Can anyone steer me in the right direction?