Count the dates in the current month
I have a list of dates in a column on a sheet. I am looking for a formula that would count only the dates in the current month and year, e.g., November for now and next month it should show the count for December 2022. It would be greatly appreciated if someone could help me out here.
Best Answer
-
Hey @Asha Krishnan
I will assume the formula is looking only at your current sheet and not bringing data in from a different sheet. The format of the formula changes slightly if using cross-sheet references.
=COUNTIFS([your date column]:[your date column],AND(ISDATE(@cell), YEAR(@cell)=YEAR(TODAY()), MONTH(@cell)=MONTH(TODAY()))
I added the ISDATE (which means only cells that have real dates in them will be evaluated) to help prevent any data errors. Be sure to change the [your date column] to match your actual column name
Will this work for you?
Kelly
Answers
-
Hey @Asha Krishnan
I will assume the formula is looking only at your current sheet and not bringing data in from a different sheet. The format of the formula changes slightly if using cross-sheet references.
=COUNTIFS([your date column]:[your date column],AND(ISDATE(@cell), YEAR(@cell)=YEAR(TODAY()), MONTH(@cell)=MONTH(TODAY()))
I added the ISDATE (which means only cells that have real dates in them will be evaluated) to help prevent any data errors. Be sure to change the [your date column] to match your actual column name
Will this work for you?
Kelly
-
@Kelly Moore Yes, your formula did the job. Thank you so much for your help!
Help Article Resources
Categories
- All Categories
- 14 Welcome to the Community
- Smartsheet Customer Resources
- 62.3K Get Help
- 364 Global Discussions
- 200 Industry Talk
- 428 Announcements
- 4.4K Ideas & Feature Requests
- 136 Brandfolder
- 127 Just for fun
- 128 Community Job Board
- 445 Show & Tell
- 28 Member Spotlight
- 1 SmartStories
- 283 Events
- 35 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!