View Single Post
  #6   Report Post  
Posted to microsoft.public.excel.misc
Harlan Grove Harlan Grove is offline
external usenet poster
 
Posts: 733
Default SUMIFS Formula Problem

"Jim Rech" wrote...
I used =SUMIFS(D1:D7,B1:B7,"CBD",C1:C7,"HOV Freeway",C1:C7,
"Freeway") and I got returned an answer of 0.


The new SUMIFS function ANDs the conditions together. So you get
0 because there are no rows where column C is "HOV Freeway" and
"Freeway". Each criteria column should be referenced just once it
appears.

So you need 2 SUMIFSs:

=SUMIFS(D1:D7,B1:B7,"CBD",C1:C7,"HOV Freeway")
+SUMIFS(D1:D7,B1:B7,"CBD",C1:C7,"Freeway")

....

Or one SUMPRODUCT,

=SUMPRODUCT((B1:B7="CBD")*(C1:C7={"HOV Freeway","Freeway"})*D1:D7)

with the added benefit that you can use this formula in .XLS files and
older versions of Excel. The addition of COUNTIFS, SUMIFS and
AVERAGEIFS really does prove no one from MSFT reads the newsgroups.