Formula help: Count how many dates are from the last week and the coming week
I am trying to do an equation in sheet summary that will calculate how many dates were in the last 7 days and are scheduled in the next 7 days.
This is what I have, I've tried others on community questions that were close and figured I would just ask.
=COUNTIFS([Start Date]:[Start Date], @cell <= TODAY(-1), @cell > TODAY(-7))
Best Answer
-
=COUNTIFS([Start Date]:[Start Date],AND(@cell <TODAY(), @cell >= TODAY(-7))) is the last 7 and
=COUNTIFS([Start Date]:[Start Date], AND(@cell >TODAY(), @cell <= TODAY(+7))) are the next 7
if your wanting to add them together.
=COUNTIFS([Start Date]:[Start Date],AND(@cell <TODAY(), @cell >= TODAY(-7)))+COUNTIFS([Start Date]:[Start Date], AND(@cell >TODAY(), @cell <= TODAY(+7)))
If you found this comment helpful. Please respond with any of the buttons below. Awesome🖤, Insightful💡, Upvote⬆️, or accepted answer. Not only will this help others searching for the same answer, but help me as well. Thank you.
Answers
-
=COUNTIFS([Start Date]:[Start Date],AND(@cell <TODAY(), @cell >= TODAY(-7))) is the last 7 and
=COUNTIFS([Start Date]:[Start Date], AND(@cell >TODAY(), @cell <= TODAY(+7))) are the next 7
if your wanting to add them together.
=COUNTIFS([Start Date]:[Start Date],AND(@cell <TODAY(), @cell >= TODAY(-7)))+COUNTIFS([Start Date]:[Start Date], AND(@cell >TODAY(), @cell <= TODAY(+7)))
If you found this comment helpful. Please respond with any of the buttons below. Awesome🖤, Insightful💡, Upvote⬆️, or accepted answer. Not only will this help others searching for the same answer, but help me as well. Thank you.
-
Perfect! Thank you :)
-
You can also combine them in a single COUNTIFS:
=COUNTIFS([Start Date]:[Start Date],AND(@cell <= TODAY(7), @cell >= TODAY(-7)))
Help Article Resources
Categories
- All Categories
- 14 Welcome to the Community
- Customer Resources
- 64.8K Get Help
- 434 Global Discussions
- 138 Industry Talk
- 470 Announcements
- 4.9K Ideas & Feature Requests
- 129 Brandfolder
- 148 Just for fun
- 65 Community Job Board
- 486 Show & Tell
- 33 Member Spotlight
- 2 SmartStories
- 300 Events
- 36 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!