Timesheet formulas - nearest 15 minutes round off



Numbers - Timesheet formulas


I'm trying to create a timesheet in Numbers. What is the formula to round the hours worked to the nearest 15


Minutes?




Time In:   Time Out:    Total:   - nearest 15 minutes round off

MacBook Pro 15″, OS X 10.11

Posted on Oct 5, 2023 7:01 PM

Reply
Question marked as Top-ranking reply

Posted on Oct 6, 2023 2:36 AM

Assuming you want to the nearest quarter hour then you can do something like this:




The formula in C2 is:


=DURATION(,,,MROUND(DUR2MINUTES(B2−A2),15)):


You need to keep those leading ,,, within the formula.


As you've discovered Numbers handles date-time differently from Excel. It also has a Duration data format, which Excel doesn't have.


This formula converts the Duration that results from subtracting one date-time from another into decimal minutes, then uses MROUND to convert to the nearest 15 minutes. The DURATION function converts this back into DURATION, which makes it easy to display as hours and minutes.




MROUND - Apple Support (HK)


DURATION - Apple Support (HK)



SG



5 replies
Question marked as Top-ranking reply

Oct 6, 2023 2:36 AM in response to Jeffrey Beatty

Assuming you want to the nearest quarter hour then you can do something like this:




The formula in C2 is:


=DURATION(,,,MROUND(DUR2MINUTES(B2−A2),15)):


You need to keep those leading ,,, within the formula.


As you've discovered Numbers handles date-time differently from Excel. It also has a Duration data format, which Excel doesn't have.


This formula converts the Duration that results from subtracting one date-time from another into decimal minutes, then uses MROUND to convert to the nearest 15 minutes. The DURATION function converts this back into DURATION, which makes it easy to display as hours and minutes.




MROUND - Apple Support (HK)


DURATION - Apple Support (HK)



SG



Oct 6, 2023 12:55 AM in response to Jeffrey Beatty

I got an answer from ChatGPT, but I got the error as you can see in the screenshot below.


In Apple Numbers, the formula syntax can be a bit different than in Excel. To calculate the time difference and round it to the nearest 0.25, 0.5, or 0.75, you can try the following steps:


1. Assume that A1 contains the time in and B1 contains the time out.

2. To calculate the time difference in hours, you can use the formula `=(B1 - A1) * 24` in C1.

3. To round off to the nearest 0.25, you can use the formula `=ROUND((B1 - A1) * 24 / 0.25) * 0.25`.


Put the above formula in a cell to get the rounded-off time difference between time in and time out.


This should give you the total hours worked, rounded to the nearest 0.25, 0.5, or 0.75.


I want the end with round off by .25 .50 .75 as it should answer from 6:40 to round off by 6:45


I did try with this formula, but it won’t work as I must have something type wrong formula entry.

I hope this helps to see.



Thank you,

Jeff



This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Timesheet formulas - nearest 15 minutes round off

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.