Counting Dates in a calendar year
I need to count rows that have a value in the "Open Date" column within a calendar year (i.e. 2020), not sure what the syntax is to limit to Jan 1 through Dec 31
Best Answer
-
@Randy Van Winkle Have you tried using the Year() function to examine what year a column of dates are from? It is straightforward if you don't mind adding a column to extract the year:
If column A holds your date, then use =YEAR(A@row) in Column B to get the year
Then in a third column you hold your answer, calculated by: =COUNTIF(B:B, =2020)
Basically, count if B = the year you are interested in. (adjust 2020 as needed)
Make sense? Let me know if you don't have flexibility to add that extraction column.
(I also recommend building Column B as a column formula, and adding some error-checking in case your date field is blank or is not a good date)
Dale
Answers
-
@Randy Van Winkle Have you tried using the Year() function to examine what year a column of dates are from? It is straightforward if you don't mind adding a column to extract the year:
If column A holds your date, then use =YEAR(A@row) in Column B to get the year
Then in a third column you hold your answer, calculated by: =COUNTIF(B:B, =2020)
Basically, count if B = the year you are interested in. (adjust 2020 as needed)
Make sense? Let me know if you don't have flexibility to add that extraction column.
(I also recommend building Column B as a column formula, and adding some error-checking in case your date field is blank or is not a good date)
Dale
-
Help Article Resources
Categories
- All Categories
- 14 Welcome to the Community
- Smartsheet Customer Resources
- 64.3K Get Help
- 423 Global Discussions
- 221 Industry Talk
- 461 Announcements
- 4.8K Ideas & Feature Requests
- 143 Brandfolder
- 143 Just for fun
- 59 Community Job Board
- 462 Show & Tell
- 32 Member Spotlight
- 1 SmartStories
- 300 Events
- 39 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!