Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Rounding Time to Nearest 5 Minutes

2,038 views
Skip to first unread message

carl

unread,
Mar 2, 2011, 12:48:35 PM3/2/11
to
I have some time series data. The format of the data is like this -
hh:mm:ss.000 am/pm

I would like to take the value in the cell and round it up to the
nearest 5 minute interval.

For example:

09:31:45.002 would round up to 09:35

12:09:22.004 would round up to 12:10.

Thank you in advance.

joeu2004

unread,
Mar 2, 2011, 1:34:20 PM3/2/11
to
On Mar 2, 9:48 am, carl <cmieda...@msn.com> wrote:
> I would like to take the value in the cell and round
> it up to the nearest 5 minute interval.
> For example:
> 09:31:45.002 would round up to 09:35
> 12:09:22.004 would round up to 12:10.

=ROUNDUP(A1*1440/5,0)*5/1440

formatted as hh:mm:ss.000.

Time is stored as a fraction of a day. So 1 hour is 1/24, 1 minute is
1/1440, and 1 second is 1/86400.

0 new messages