Forum Discussion
CalebA1055
Jul 29, 2024Copper Contributor
Figuring the best way to use SUMIFS/DSUM with dates and criteria
Hi Everyone, I'm currently working on a spreadsheet for my job. The goal of the current equation is to look at the criteria of the columns and give a total based on a certain month and Species of woo...
OliverScheurich
Jul 29, 2024Gold Contributor
SUMPRODUCT can do this.
SUMPRODUCT function - Microsoft Support
=SUMPRODUCT(((K4:K36="A")+(K4:K36="B"))*(M4:M36<EOMONTH(TODAY(),0))*L4:L36)
I can't rebuild your sheet but this formula works in the sample file and might answer the question.
In your second formula the ranges are not the same e.g. F2:F10834 and I2:I1048576 are different. The first has 10833 rows the second has 1048575 rows which doesn't work.
- CalebA1055Jul 29, 2024Copper ContributorI guess my more specific question would be a good way to filter the dates and select a month as a whole while keeping the dates as is. I hope this will be used in years to come.