Hi Excel Experts,
I need urgent help with the following problem:
I have three rows (each of which stands for one document that undergoes a particular review cycle) Per row (ie document), I know Date B and Date A (with Date B being later in time than Date A). Now I want to calculate the average duration (in days) across all rows, i.e. I need to look at what is the duration in days per row; then sum this up; then divide by the count of rows.
So far, I have identified following solutions to calculate the average:
=SUM(($J$5:$J$8)-($D$5:$D$8))/COUNT($D$5:$D$8)
and then enter as an array.
[J5:J8 and D5:D8 are the ranges in which Dates B respectively A can be found]
This formula works out well (albeit it may not be very elegant).
However, there is one complication: I have hidden and filtered some rows. If I use the formula above, this shows all rows, not just the filtered ones and no longer gives the correct average.
I have tried to adapt the above formula in SUBTOTAL, i.e.
=SUBTOTAL(101, (($J$5:$J$8)-($D$5:$D$8))), entering as array
or =SUBTOTAL (101, SUM(($J$5:$J$8)-($D$5:$D$8)))
and also =SUBTOTAL(109,(($J$5:$J$8)-($D$5:$D$8)))/SUBTOTAL(102,($D$5:$D$8)), entering as array
but none of it works.
Can anybody help?
Thank you!!
Bookmarks