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
- Customer Resources
- 65.3K Get Help
- 445 Global Discussions
- 144 Industry Talk
- 477 Announcements
- 5K Ideas & Feature Requests
- 85 Brandfolder
- 151 Just for fun
- 72 Community Job Board
- 488 Show & Tell
- 33 Member Spotlight
- 2 SmartStories
- 302 Events
- 36 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!