Time ROUNDUP or ROUNDDOWN

Hi Folks


Is there anyway of rounding up and rounding down time values please.


For example:

Start Time: 04:35 and I want it to be rounddown to 04:30

Finish Time: 17:50 and I want it to be roundup to 18:00


Regards

David

iMac Line (2012 and Later)

Posted on Sep 27, 2019 6:14 AM

Reply
Question marked as Top-ranking reply

Posted on Sep 27, 2019 8:32 AM

Assuming you want to round up/down to the quarter hour (15 minutes), then one way is to do something like this:




The formula to round down, in B2, with the original time in A2::


=TIME(HOUR(A2),FLOOR(MINUTE(A2),15),SECOND(A2))


The formula to round up, in D2, with the original time in C2:


=TIME(HOUR(C2),CEILING(MINUTE(C2),15),SECOND(C2))


The formulas are the same except that one uses FLOOR and one uses CEILING.


If your region uses , as a decimal separator replace the , in the formulas with ; .


SG


5 replies
Question marked as Top-ranking reply

Sep 27, 2019 8:32 AM in response to DaCord

Assuming you want to round up/down to the quarter hour (15 minutes), then one way is to do something like this:




The formula to round down, in B2, with the original time in A2::


=TIME(HOUR(A2),FLOOR(MINUTE(A2),15),SECOND(A2))


The formula to round up, in D2, with the original time in C2:


=TIME(HOUR(C2),CEILING(MINUTE(C2),15),SECOND(C2))


The formulas are the same except that one uses FLOOR and one uses CEILING.


If your region uses , as a decimal separator replace the , in the formulas with ; .


SG


Sep 27, 2019 9:16 AM in response to DaCord

If you have durations in, say, A2 and C2, then you can do something like this:




In B2, with the original duration in A2:


=DURATION(,,,FLOOR(DUR2MINUTES(A2),15))


In D2, with the original duration in C2:


=DURATION(,,,CEILING(DUR2MINUTES(C2),15))


If this still isn't what you are looking for you could try posting a screenshot.


SG



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.

Time ROUNDUP or ROUNDDOWN

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