COUNTIF with dates and years
Hello,
I am trying to write a formula to count executed leases for 2019 and 2020. I do not have a lot of experience writing long formulas but basically the logic is count if there is a date in the Lease Signed field AND if grand opening is between 1/1/19 to 12/31/19 or 1/1/2020 to 12/31/2020. Can anyone provide some guidance or recommendations to try? Here's a screenshot of my sheet:
Comments
-
COUNTIF checks for a single condition, while COUNTIFS checks for multiple conditions. Try this:
=COUNTIFS([Lease Signed]:[Lease Signed], ISDATE(@cell), [Grand Open Date]:[Grand Open Date], >=DATE(2019, 1, 1), [Grand Open Date]:[Grand Open Date], <=DATE(2020, 12, 31))
-
Here is another variation on Brian's formula.
=COUNTIFS([Lease Signed]:[Lease Signed], ISDATE(@cell), [Grand Open Date]:[Grand Open Date], OR(YEAR(@cell) = 2019, YEAR(@cell) = 2020))
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
- 63K Get Help
- 380 Global Discussions
- 212 Industry Talk
- 442 Announcements
- 4.6K Ideas & Feature Requests
- 140 Brandfolder
- 129 Just for fun
- 130 Community Job Board
- 449 Show & Tell
- 30 Member Spotlight
- 1 SmartStories
- 305 Events
- 34 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!