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
- 64.9K Get Help
- 441 Global Discussions
- 139 Industry Talk
- 471 Announcements
- 4.9K Ideas & Feature Requests
- 129 Brandfolder
- 148 Just for fun
- 68 Community Job Board
- 496 Show & Tell
- 33 Member Spotlight
- 2 SmartStories
- 300 Events
- 36 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!