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
- Smartsheet Customer Resources
- 64.3K Get Help
- 423 Global Discussions
- 221 Industry Talk
- 461 Announcements
- 4.8K Ideas & Feature Requests
- 143 Brandfolder
- 144 Just for fun
- 59 Community Job Board
- 462 Show & Tell
- 32 Member Spotlight
- 1 SmartStories
- 300 Events
- 39 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!