Forum Discussion
andyredfern
Mar 18, 2020Copper Contributor
Using COUNTIF to select a date
I have a column of dates and I'm trying to count all the dates in Jan, Feb ...etc. I'm trying to use COUNTIF with MONTH() but not sure how to get this to work. Pretty new to Excel so any help...
Savia
Mar 18, 2020Iron Contributor
andyredfern So what you need to do is use COUNTIFS and have two conditions - that the dates are after the start date, and before an end date. An example:
=COUNTIFS(A1:A100, ">="&DATE(2020,3,1), A1:A100, "<="&DATE(2020,3,31))
You could of course replace those DATE functions with cell references.
andyredfern
Mar 18, 2020Copper Contributor
SaviaThanks -- certainly does the job. I'm now going to spend a little time working out exactly how!
Andy