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
Need more help? 👀 | Help and Learning Center
こんにちは (Konnichiwa), Hallo, Hola, Bonjour, Olá, Ciao! 👋 | Global Discussions
-
Wonderful! Glad this worked for you!
Need more help? 👀 | Help and Learning Center
こんにちは (Konnichiwa), Hallo, Hola, Bonjour, Olá, Ciao! 👋 | Global Discussions
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
Need more help? 👀 | Help and Learning Center
こんにちは (Konnichiwa), Hallo, Hola, Bonjour, Olá, Ciao! 👋 | Global Discussions
-
YES!!! Perfect! thank you for your help!! :-)😁
-
Wonderful! Glad this worked for you!
Need more help? 👀 | Help and Learning Center
こんにちは (Konnichiwa), Hallo, Hola, Bonjour, Olá, Ciao! 👋 | Global Discussions
Categories
- All Categories
- 14 Welcome to the Community
- Customer Resources
- 64.9K Get Help
- 439 Global Discussions
- 138 Industry Talk
- 471 Announcements
- 4.9K Ideas & Feature Requests
- 129 Brandfolder
- 148 Just for fun
- 68 Community Job Board
- 488 Show & Tell
- 33 Member Spotlight
- 2 SmartStories
- 300 Events
- 36 Webinars
- 7.3K Forum Archives