How to average the duration between dates if conditions are met
I'm building a spreadsheet with monthly metrics and having issues creating a formula.
There will be a separate smartsheet with individual events (1 row per event). The formula I'm trying to build: For all events with a date of notification within X month & year, average duration between 2 dates (start & end date for each event).
I need the formula to go through all rows to find any rows with a date of notification within that month and if it meets that criteria, to average the duration of that event with any other events that also occurred within that month.
The equation I've tried to use so far is:
=AVERAGEIF({Date of Notification}, AND(IFERROR(MONTH(@cell), 0) = MONTH([Start Date]@row), IFERROR(YEAR(@cell), 0) = YEAR([Start Date]@row)), NETDAYS({Date of Notification}, {Closure Date}))
The {Date of Notification} and {Closure Date} both reference whole columns. Is there a way to do this or do I need to create a helper "Netdays" column within the individual event smartsheet and then use that as my range for AverageIf?
Best Answer
-
You have to have the duration on each row of the source sheet. Then you can average the duration column in your formula.
Answers
-
You have to have the duration on each row of the source sheet. Then you can average the duration column in your formula.
Help Article Resources
Categories
- All Categories
- 14 Welcome to the Community
- Customer Resources
- 64.8K Get Help
- 434 Global Discussions
- 138 Industry Talk
- 470 Announcements
- 4.9K Ideas & Feature Requests
- 129 Brandfolder
- 148 Just for fun
- 65 Community Job Board
- 486 Show & Tell
- 33 Member Spotlight
- 2 SmartStories
- 300 Events
- 36 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!