Date Range formula format
I'm trying to figure out a way to get the number of rows that have a date within a certain range. An example would be if I have a column with dates ranging from January 1 2020 to August 1 2020, how many of those dates fall in the month of January?
Is this possible?
Best Answers
-
Hi @Kevin McIntosh,
Yes this is definitely possible. You can use a COUNTIF function and the MONTH function looking @ each cell in that range to count how many rows contain a specific Month...
Try this:
=COUNTIF([Date Column]:[Date Column], IFERROR(MONTH(@cell), 0) = 1)
I've wrapped an IFERROR around the Month function so that if any of the cells aren't dates (ex. blank cells) it will exclude them and read them as "0". Then at the end I say = 1 because I'm looking for dates with the MONTH of January, or 1.
If I was looking for February, I'd just have to swap that out to be a 2, like so:
=COUNTIF([Date Column]:[Date Column], IFERROR(MONTH(@cell), 0) = 2)
Does that make sense? Let me know if you need any further help!
Cheers,
Genevieve
-
Wonderful! Glad this worked for you!
Answers
-
Hi @Kevin McIntosh,
Yes this is definitely possible. You can use a COUNTIF function and the MONTH function looking @ each cell in that range to count how many rows contain a specific Month...
Try this:
=COUNTIF([Date Column]:[Date Column], IFERROR(MONTH(@cell), 0) = 1)
I've wrapped an IFERROR around the Month function so that if any of the cells aren't dates (ex. blank cells) it will exclude them and read them as "0". Then at the end I say = 1 because I'm looking for dates with the MONTH of January, or 1.
If I was looking for February, I'd just have to swap that out to be a 2, like so:
=COUNTIF([Date Column]:[Date Column], IFERROR(MONTH(@cell), 0) = 2)
Does that make sense? Let me know if you need any further help!
Cheers,
Genevieve
-
YES!!! Perfect! thank you for your help!! :-)😁
-
Wonderful! Glad this worked for you!
Categories
- All Categories
- 14 Welcome to the Community
- 10.7K Get Help
- 63 Global Discussions
- 69 Industry Talk
- 385 Announcements
- 3.5K Ideas & Feature Requests
- 55 Brandfolder
- 125 Just for fun
- 50 Community Job Board
- 464 Show & Tell
- 40 Member Spotlight
- 44 Power Your Process
- 28 Sponsor X
- 234 Events
- 7.3K Forum Archives