I am trying to count the dates that occurred within the past 10 days
I am struggling in counting the dates (under a date column) that occured within the past ten days. It is coming out as unparseable. I used the formula below:
=countif ([date]:[date], <=(TODAY()-7)
I would appreciate the help.
Answers
-
I can see a couple of problems:
1. The function should be capitalized. This will cause the UNPARSEABLE error.
=COUNTIF(date:date, <=(TODAY() - 7))
2. Once this works, it will count where the date in the date column is before or on the date 7 days before today. That is not dates that occurred within the past 10 days.
The formula below will give you dates on or after the date 9 days ago. Note - Any future dates will also be included so you might need to add a second criteria (using COUNTIFS) if there is a possibility of your column including dates in the future
=COUNTIF(date:date, >=(TODAY() - 9))
-
Hi @GeeAre - To count the dates that occurred within the past 10 days I would recommend to use the following formula:
=COUNTIFS(Date:Date, <TODAY(), Date:Date, >=TODAY(-10))
OR you can also use the following format:
=COUNTIFS(Date:Date, AND(@cell < TODAY(), @cell >= TODAY(-10)))
Cheers!
-
The second formula worked, thank you! Can you tell me why you added @cell?
-
The @cell argument enables you to efficiently perform the two calculations at the same time.
It is basically saying that you want to count if the date in the cell is less than today and also the date in the cell is after or on the date 10 days before today.
Help Article Resources
Categories
- All Categories
- 14 Welcome to the Community
- Smartsheet Customer Resources
- 62.9K Get Help
- 376 Global Discussions
- 207 Industry Talk
- 440 Announcements
- 4.5K Ideas & Feature Requests
- 139 Brandfolder
- 129 Just for fun
- 130 Community Job Board
- 449 Show & Tell
- 30 Member Spotlight
- 1 SmartStories
- 286 Events
- 33 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!