Below is a formula that someone gave me that I use to compute sleep time over the past 5 days (I have similar formulas for 10 and 30 days).
Column A is the date and column J is the total time spent sleeping in hours:minutes.
I really don’t understand how these array formulas work. I’ve looked at the Excel help file and browsed some websites looking for a detailed description of a similar formula but haven’t yet found one.
Can someone give me a detailed explanation of what is going on as this formula iterates from row 4 forward so I can try and get my head around what is going on and how it is going on?
=AVERAGE(IF(ISNUMBER(J4:J370)*(A4:A370>((TODAY()-1)-5))*(A4:A370<=(TODAY()-1)),J4:J370))