countif by date references
I have a column of dates in one sheet called {Dates}
In a second sheet I want to analyze the dates based on if they fall into a specific calendar month
I have a column called Y (year) filled with data like 2020, and a column called M (month) filled with data like 1 (i.e. January) using the following formula:
=COUNTIFS({Dates}, MONTH(@cell) = M1, {Dates}, YEAR(@cell) = Y1)
I'm getting an invalid data type as a result.
I've also try comparing them to a column formated as a date called "target" as Month(@cell) =Month(target1) which also doesn't work.
Best Answer
-
Try something along the lines of
=COUNTIFS({Dates}, AND(IFERROR(MONTH(@cell), 0) = M@row, IFERROR(YEAR(@cell), 0) = Y@row))
Come see me in Seattle at ENGAGE 2024! I will be at the 10xViz partner booth throughout as well as the "Lets Talk About Community" Meet & Eat table on Tuesday from 11:45am - 12:45pm!
Answers
-
Try something along the lines of
=COUNTIFS({Dates}, AND(IFERROR(MONTH(@cell), 0) = M@row, IFERROR(YEAR(@cell), 0) = Y@row))
Come see me in Seattle at ENGAGE 2024! I will be at the 10xViz partner booth throughout as well as the "Lets Talk About Community" Meet & Eat table on Tuesday from 11:45am - 12:45pm!
-
thats a good one, Paul. Thanks.
-
Happy to help! 👍️
Come see me in Seattle at ENGAGE 2024! I will be at the 10xViz partner booth throughout as well as the "Lets Talk About Community" Meet & Eat table on Tuesday from 11:45am - 12:45pm!
Help Article Resources
Categories
- All Categories
- 14 Welcome to the Community
- Smartsheet Customer Resources
- 62.8K Get Help
- 376 Global Discussions
- 207 Industry Talk
- 438 Announcements
- 4.5K Ideas & Feature Requests
- 139 Brandfolder
- 129 Just for fun
- 130 Community Job Board
- 451 Show & Tell
- 30 Member Spotlight
- 1 SmartStories
- 282 Events
- 32 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!