Forum Discussion

Matt Johnson's avatar
Matt Johnson
Copper Contributor
Nov 13, 2018
Solved

Integrating MROUND in to time formula

Hello,

 

I'm creating a basic timesheet that calculates hours.My goal is to have the total hours worked displayed in a cell, but also round it to the nearest :15 (MROUND) and I can't get the structure correct.

 

Currently I use this formula to calculate the hours. =IF([@[Stop Time]]<[@[Start Time]],[@[Stop Time]]+1,[@[Stop Time]])-[@[Start Time]]

 

I can't figure out where to add the MROUND function.

 

Any assistance is greatly appreciated! Thank you. 

4 Replies

  • SergeiBaklan's avatar
    SergeiBaklan
    Diamond Contributor

    Hi Matt,

     

    I guess just wrap your formula by MROUND

    =MROUND(<your formula>,"00:15")

     

    • Matt Johnson's avatar
      Matt Johnson
      Copper Contributor

      Thanks for the reply, but it generates an error when I try it. To ensure I'm not entering it incorrectly, it would be:

       

      =MROUND(IF([@[Stop Time]]<[@[Start Time]],[@[Stop Time]]+1,[@[Stop Time]])-[@[Start Time]],"00:15")

      Is that correct? 

Resources