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
- Smartsheet Customer Resources
- 63.9K Get Help
- 410 Global Discussions
- 219 Industry Talk
- 457 Announcements
- 4.8K Ideas & Feature Requests
- 143 Brandfolder
- 136 Just for fun
- 57 Community Job Board
- 459 Show & Tell
- 31 Member Spotlight
- 1 SmartStories
- 298 Events
- 37 Webinars
- 7.3K Forum Archives