I have column D filled with dates starting at D8. They are formatted MM/DD/YYYY and span several years, and a new date is added manually every few days.
I needed to count how many cells have a date that falls in the current month and year, and I found another post that suggested using SUMPRODUCT. I was able to alter a formula I found to do this, though I really don't understand what the SUMPRODUCT formula is actually doing, I just fumbled around with it until it worked:
=SUMPRODUCT(--(MONTH(D8:D9999)=MONTH(TODAY())),(--(YEAR(D8:D9999)=YEAR(TODAY()))))
However, now I am asked to get a similar count of the number of cells that have a date that falls in the last month and the month before that.
I have been trying to alter my SUMPRODUCT formula with the EDATE function, but I have been unable to find a way to make anything work. I have tried several COUNTIF formulas to achieve the same data count, but still can't come up with anything.
Any suggestions?
I needed to count how many cells have a date that falls in the current month and year, and I found another post that suggested using SUMPRODUCT. I was able to alter a formula I found to do this, though I really don't understand what the SUMPRODUCT formula is actually doing, I just fumbled around with it until it worked:
=SUMPRODUCT(--(MONTH(D8:D9999)=MONTH(TODAY())),(--(YEAR(D8:D9999)=YEAR(TODAY()))))
However, now I am asked to get a similar count of the number of cells that have a date that falls in the last month and the month before that.
I have been trying to alter my SUMPRODUCT formula with the EDATE function, but I have been unable to find a way to make anything work. I have tried several COUNTIF formulas to achieve the same data count, but still can't come up with anything.
Any suggestions?