Esteemed Panel,
I am trying to create a formula in column D to figure out the average days that lapse between each date for the data in Columns A, B, & C but have been unsuccessful
Can you asisst?
Esteemed Panel,
I am trying to create a formula in column D to figure out the average days that lapse between each date for the data in Columns A, B, & C but have been unsuccessful
Can you asisst?
In cell D2 paste:
copy/autofill down.![]()
Please Login or Register to view this content.
Docendo discimus.
Maybe one of
=(C2-A2)/(COUNT(A2:C2)-1)
=IF(COUNTBLANK(A2:C2),"",STDEVP(A2,C2))
Cheshire - What would the formula look like if there are 5 date's - alal attached?
You could go with an extension of the current formula:
or use an array formula:![]()
Please Login or Register to view this content.
confirmed as an array formula with Ctrl-Shift-Enter.![]()
Please Login or Register to view this content.
You don't indicate if cheshire's assumption that rows with blank dates should not be averaged is correct or not.
Either way you don't need to overcomplicate things with long formula, or arrays when there is simple generic solution with my first suggestion in post #3.
With 3 dates =(C2-A2)/(COUNT(A2:C2)-1)
With 5 dates =(E2-A2)/(COUNT(A2:E2)-1)
With any other number of dates the basic construction of the formula is, =(last date - first date)/(COUNT(last date : first date)-1)
To ignore rows with blanks =IF(COUNTBLANK(first date : last date),"",(last date - first date)/(COUNT(first date : last date)-1))
Here is my issue - my data has lots of blanks across a potential 5 date's - please see attached.
How should this be handled - I did a 'Countif' to figure out if I have 1 date or 4 - but the seqyences are not the same, so I am having a hard time applying your formula
See how you get on with this one
=IFERROR((MAX(A3:E3)-MIN(A3:E3))/(COUNT(A3:E3)-1),"N/A")
In cell A3 paste:
Confirmed as an array formula with Ctrl-Shift-Enter, then copy autofill down.![]()
Please Login or Register to view this content.
- - - - - - - -
I don't have IFERROR (on Excel 2003 atm). Go with Jason's formula.
Last edited by CheshireCat; 08-17-2012 at 03:51 PM.
Genius - perfect.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks