How to calculate the Average number of days based on a range with a date criteria?
I am trying to write a formula for calculating the average number of days in one range based on anything added to the sheet post July 1 2020. I have tried several combinations. I can get a simple AVERAGE of the range for the whole sheet but need to specify only average the data after July 1.
Works and provides average for entire sheet:
=AVERAGEIF([Days to Complete]:[Days to Complete]
Does not work and produces an uparseable error:
=AVERAGEIF(COLLECT([Submitted Date]:[Submitted Date], [Submitted Date]:[Submitted Date], > DATE(2020, 7, 1))[Days to Complete]:[Days to Complete],
Any suggestions?
Answers
-
Hey @Robert Tebault
Try this
=AVG(COLLECT([Days to Complete]:[Days to Complete], [Submitted Date]:[Submitted Date], ISDATE(@cell), [Submitted Date]:[Submitted Date], > DATE(2020, 7, 1))
Kelly
-
Thank you for the response. My apologies for the late reply.
This formula provides and unparseable error. I will keep working on it.
Help Article Resources
Categories
- All Categories
- 14 Welcome to the Community
- Customer Resources
- 67.8K Get Help
- 474 Global Discussions
- 206 Use Cases
- 517 Announcements
- 5.5K Ideas & Feature Requests
- 87 Brandfolder
- 157 Just for fun
- 83 Community Job Board
- 521 Show & Tell
- 36 Member Spotlight
- 3 SmartStories
- 309 Events
- 37 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!