Forum Discussion
Formula for adding certain cells
All ranges must be the same size, so
=SUMIFS(Data!$C$1:$C$100,Data!$AM$1:$AM$100,"Asda - Cable Maintenance",Data!$E$1:$E$100,">="&$S$1,Data!$E$1:$E$100,"<="&$T$1)
- HansVogelaarSep 08, 2022MVP
No, that won't work. The syntax of SUMIFS is different from that of SUMIF:
=SUMIF(criteria_range, criteria, sum_range)
=SUMIFS(sum_range, criteria_range1, criteria1, criteria_range2, criteria2, ...)
Could you attach a sample workbook (without sensitive data), or if that is not possible, make it available through OneDrive, Google Drive, Dropbox or similar? Alternatively, you can attach it to a private message to me. Thanks in advance.
- JamesbodenSep 08, 2022Copper Contributor
HansVogelaar This is very basic idea. As you notice in tab "Costs" its saying 0, but there is data in the data tab.
- HansVogelaarSep 08, 2022MVP
The numbers you want to sum are in column D, so the first argument (the sum_range) should be Data!D:D.
The codes are in column A, so the first criteria range should be Data!A:A.
=SUMIFS(Data!D:D,Data!A:A,"A-QW",Data!B:B,">="&$S$1,Data!B:B,"<="&$T$1)
sum_rng, crit_rng1, criteria_1, crit_rng2, criteria2, crit_rng3, criteria3