Timesheet formulas

I'm trying to create an iCloud based timesheet in Numbers. What is the formula to round the hours worked to the nearest 15 minutes?


Thanks in advance!

pining4co

MacBook Pro 13″, macOS 10.15

Posted on Feb 12, 2021 2:00 PM

Reply
Question marked as Top-ranking reply

Posted on Feb 12, 2021 5:51 PM

Hi p4c,


The likely function is MROUND, which rounds a number to a specified multiple.


As we're starting with a Duration, we'll need to convert that value to the equivalent number of hours using DUR2HOURS before rounding.


And, assuming the end answer is to be a Duration, we'll need DURATION to convert the rounded number back to a Duration.


Formula, as entered in B2: DURATION(weeks,days,MROUND(DUR2HOURS(B2),0.25),minutes,seconds,milliseconds)


The formula can be shortened slightly to: DURATION(,,MROUND(DUR2HOURS(B4),0.25),minutes)


Note that the two commas between the first ( and MROUND are required to tell DURATION that the number being presented represents 'number of hours. 'seconds and milliseconds, and their preceding commas may be removed as the smallest unit in the result will be minutes.


After entering the formula in C2, fill it down as many rows as you need.


Regards,

Barry

1 reply
Question marked as Top-ranking reply

Feb 12, 2021 5:51 PM in response to pining4co

Hi p4c,


The likely function is MROUND, which rounds a number to a specified multiple.


As we're starting with a Duration, we'll need to convert that value to the equivalent number of hours using DUR2HOURS before rounding.


And, assuming the end answer is to be a Duration, we'll need DURATION to convert the rounded number back to a Duration.


Formula, as entered in B2: DURATION(weeks,days,MROUND(DUR2HOURS(B2),0.25),minutes,seconds,milliseconds)


The formula can be shortened slightly to: DURATION(,,MROUND(DUR2HOURS(B4),0.25),minutes)


Note that the two commas between the first ( and MROUND are required to tell DURATION that the number being presented represents 'number of hours. 'seconds and milliseconds, and their preceding commas may be removed as the smallest unit in the result will be minutes.


After entering the formula in C2, fill it down as many rows as you need.


Regards,

Barry

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

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