
Originally Posted by
zeddy
Hi
If your first date starts in column [A] row4 (as per your formula), and your bed time is column [H], your wake up time is column [i] and your sleep time is column [K], then..
This formula will give you the average time you went to bed over the previous 5 days:
=AVERAGE(OFFSET($A$1,MATCH(TODAY()-1,$A:$A,FALSE)-5,7,5,1))
This formula will give you the average time you went to bed over the previous 10 days:
=AVERAGE(OFFSET($A$1,MATCH(TODAY()-1,$A:$A,FALSE)-10,7,10,1))
This formula gives you the average sleep time over the previous 5 days:
=AVERAGE(OFFSET($A$1,MATCH(TODAY()-1,$A:$A,FALSE)-5,9,5,1))
This formula gives you the average sleep time over the previous 10 days:
=AVERAGE(OFFSET($A$1,MATCH(TODAY()-1,$A:$A,FALSE)-10,9,10,1))
see my attached file as an example.
Note: These are 'ordinary' formulas so you don't need to enter with Ctrl-Shift-Enter etc as you would for arrays.
zeddy