View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Claus Busch Claus Busch is offline
external usenet poster
 
Posts: 3,872
Default SUMIFS with multiple criteria provides wrong result

Hi Gijs,

Am Tue, 24 Oct 2017 11:15:51 +0100 schrieb GijsKijlstra:

BACKGROUND
In cell i9 I have the following formula:
=SUMIFS(Input!$F:$F,
Input!$A:$A,"="&I$2,
Input!$A:$A,"<"&EDATE(I$2,1),
Input!$G:$G,$G$2,
Input!$H:$H,$G$2,
Input!$B:$B,$G16)

EXPLANATION
Input!$F:$F is a column with values
Input!$A:$A is a column with range1 (dates in format: dd/mm/yyyy)
I$2 is criteria1
Input!$G:$G is a (text) column with range2; $G$2 is (text) criteria2
Input!$H:$H is a (text) column with range3; $G$2 is (text) criteria3
Input!$B:$B is a (text) column with range4; $G9 is (text) criteria4


what about columns G and H? Do you only want to summarize if G /AND/ H
are the same as the criteria?
If you want to summerize if G or H are the same as the criteria, try:

=SUMPRODUCT((Input!A1:A100=$I$2)*(Input!A1:A100<= EDATE($I$2,1))*(Input!G1:H100=$G$2)*(Input!B1:B100 =$G$16)*Input!F1:F100)


Regards
Claus B.
--
Windows10
Office 2016