Forum Discussion
nini8519
Jul 06, 2022Copper Contributor
Excel Help--Finding the Average Duration within the past month
Hello, Trying to find the average duration of a project metric in the past month. =(AVERAGEIF('Onboarding Interface Tracker'!T6:T285, ">0") AND (COUNTIF('Onboarding Interface Tracker'!S6:S28...
mtarler
Silver Contributor
nini8519 There appear to be a number of issues with that formula including wrong () groupings and trying to AND your AVERAGEIF with other conditions AND trying to subtract 2 COUNTIF statements. Try this (I didn't actually test it but should be close if not right):
=AVERAGEIFS('Onboarding Interface Tracker'!T6:T285,
'Onboarding Interface Tracker'!T6:T285, ">0",
'Onboarding Interface Tracker'!S6:S285,">"&EOMONTH(TODAY(),-2),
'Onboarding Interface Tracker'!S6:S285,"<="&EOMONTH(TODAY(),-1)
)
is that >0 criteria required?
As for past year you can use similar format and use EOMONTH(..., -13) for the past 12 months or use that DATE(...) format you were using. (Using DATE() wasn't a problem except that you had misaligned (), I just switched to EOMONTH because it is cleaner and easier to read)
Hope that helps