Forum Discussion
Thomas Hochard
Jul 31, 2020Copper Contributor
Excel Sum Product / Date Range
I'm using the formula below to count the number of occurrences between the range of dates. =SUMPRODUCT((A2:A317>=DATEVALUE("7/1/2019"))*(A2:A317<=DATEVALUE("6/20/2020"))) =SUMPRODUCT((B2:B317>=DAT...
Thomas Hochard
Jul 31, 2020Copper Contributor
I believe this is the solution:
=SUMPRODUCT(((A2:B317>=DATEVALUE("7/1/2019"))*(B2:B317<=DATEVALUE("6/30/2020")*(A2:B317<=DATEVALUE("9/1/2019")))))
=SUMPRODUCT(((A2:B317>=DATEVALUE("7/1/2019"))*(B2:B317<=DATEVALUE("6/30/2020")*(A2:B317<=DATEVALUE("9/1/2019")))))
mtarler
Jul 31, 2020Silver Contributor
Thomas Hochard you answer doesn't seem to meet what you requested. Here is my options:
=COUNTIFS(A2:A317,"<="&DATEVALUE("2019-09-01"),B2:B317,">="&DATEVALUE("2019-09-01"),B2:B317,"<="&DATEVALUE("2020-06-30"))
in the attached I added a table where you can enter start/end dates for each for various counts. You also can just use the filter (down arrow) on the table to filter by date ranges and then just look at the ribbon on the bottom to see how many records are found.