Forum Discussion

David Ramseur's avatar
David Ramseur
Copper Contributor
Oct 31, 2017

Need help with formula for average time between two diferent sets of dates.

I am trying to calculate average time between two different date columns.  I have been typing the following formula out for over 20 different rows: =((b1-a1)*24+(b2-a2)*24+(b3-a3)*24...).  How can I simplify this so I don't have to type out every cell?

    • David Ramseur's avatar
      David Ramseur
      Copper Contributor

      Thank you so much Sergei!  In this case I had 21 rows and the right formula I needed turned out to be =SUMPRODUCT((H3:H23-E3:E23)*24)/21

       

      What should I do if I need to skip over a few rows within the range?  For instance, now I need to skip rows 4, 5, 6, 11, 13, 14, 15, 16, 18, 19, 21, and 23

       

      Then, my next calculation after that needs to skip rows 3, 7, 8, 9, 10, 12, 17, 20, and 22.

      • SergeiBaklan's avatar
        SergeiBaklan
        MVP

        David,

         

        Depends on how do you define which rows to skip. Are that rows empty (or have some other value based on which to skip) or you define rows to skip by their numbers?

         

         

    • John Stewart's avatar
      John Stewart
      Copper Contributor

      Sergei--

       

      I hope this goes to you. I'm trying to average some time intervals calculated from subtracting an earlier time from a later time. They are MM:SS, like for instance 11:32.

       

      Thanks,

      John

       

      • SergeiBaklan's avatar
        SergeiBaklan
        MVP

        Hi John,

         

        That is separate topic, better if you start new conversation with it. In general AVERAGE() shall work.

Resources