Calculating average difference in dates between two columns
Hi I am trying to find the average time to complete a task without adding additional columns in my sheet. I would like to set it up in the sheet summary for easy reporting.
In excel I would use the following formula. If a cell is blank the row will not be calculated as part of the average.
=SUMPRODUCT((I2:I52)(E2:E52),(E2:E52 > 0),(I2:I52 > 0))/SUMPRODUCT((ISNUMBER(I2:I52))*ISNUMBER(E2:E52))
Best Answer

Can I ask why you don't want to add another column? The only way I can currently think of to achieve this is to add one additional column to your sheet...this would be needed to calculate the daysperrow using your two date columns. If you just didn't want the clutter of another column you could then hide the column, and it would still work for your calculations. The formula to find the days in each row is pretty simple:
=[CCP NOTICE]@row  [ASSIGNED DATE]@row
Then you could build the AVERAGEIF formula to average the days from the helper column. The formula I have in the screen capture below is as follows:
=AVERAGEIF([Days to Fill]:[Days to Fill], NOT(ISBLANK(@cell)))
Or in your sheet,
=AVERAGEIF([Helper Column]:[Helper Column], NOT(ISBLANK(@cell)))
Let me know if this would work for you!
Cheers,
Genevieve
Join us at Smartsheet ENGAGE 2024 🎉
October 8  10, Seattle, WA  Register now
Answers

Can I ask why you don't want to add another column? The only way I can currently think of to achieve this is to add one additional column to your sheet...this would be needed to calculate the daysperrow using your two date columns. If you just didn't want the clutter of another column you could then hide the column, and it would still work for your calculations. The formula to find the days in each row is pretty simple:
=[CCP NOTICE]@row  [ASSIGNED DATE]@row
Then you could build the AVERAGEIF formula to average the days from the helper column. The formula I have in the screen capture below is as follows:
=AVERAGEIF([Days to Fill]:[Days to Fill], NOT(ISBLANK(@cell)))
Or in your sheet,
=AVERAGEIF([Helper Column]:[Helper Column], NOT(ISBLANK(@cell)))
Let me know if this would work for you!
Cheers,
Genevieve
Join us at Smartsheet ENGAGE 2024 🎉
October 8  10, Seattle, WA  Register now
Help Article Resources
Categories
 All Categories
 14 Welcome to the Community
 Smartsheet Customer Resources
 61.2K Get Help
 320 Global Discussions
 197 Industry Talk
 415 Announcements
 4.2K Ideas & Feature Requests
 126 Brandfolder
 153 Just for fun
 124 Community Job Board
 441 Show & Tell
 26 Member Spotlight
 1 SmartStories
 276 Events
 34 Webinars
 7.3K Forum Archives
Check out the Formula Handbook template!