Forum Discussion
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.
Correct, I copy/pasted your formula - it works
assuming you are on English locale. And in attached file
4 Replies
- SergeiBaklanDiamond Contributor
Hi Matt,
I guess just wrap your formula by MROUND
=MROUND(<your formula>,"00:15")
- Matt JohnsonCopper 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?
- SergeiBaklanDiamond Contributor
Correct, I copy/pasted your formula - it works
assuming you are on English locale. And in attached file