Reputation: 325
I am trying to calculate the average difference between two columns in excel. The columns contain a planned and an actual date, I would like to get the average difference but only for planned dates within the last three months.
Example:
Planned Start Date | Actual Start Date
21/09/2013 | 25/09/2013
10/07/2014 | 16/07/2014
01/06/2014 | 30/06/2014
The formula should only take line 2 & 3 (line 1 is older than 3 months), look at the difference in days for each applicable line (line 2: 6 days, line 3: 29 days) and then show the average ( 17.5 days) of all applicable lines.
Does anybody have a formula for this? Excel really isn't my strong suit...
Upvotes: 0
Views: 459
Reputation: 12489
Assume your data is in A2:B4 then try this array
formula
=AVERAGE(IF(TODAY()-A2:A4<=90,B2:B4-A2:A4))
90
)CTRL + SHIFT + ENTER
to enter the formula as an array formulaBased on your example I get a result of 17.5 days.
Upvotes: 2