Rounding Time values

M

mebsmith

I am looking to round a time field such as this:

6:40:00 AM

to the nearest hour, keeping it in a format so that it can be displayed in
24hr format for easy identification as to the time of day. Even keeping the
AM/PM would be fine too.

Any suggestions? I have exhausted all the ones i thought would work.

Thanks
 
B

Brad

Heres a function to calculate and display results, replace A1 with whatever
cell your time value is in.

=TIME(IF(MINUTE(A1)>30, HOUR(A1)+1,HOUR(A1)),0,0)
 
D

David Biddulph

=MROUND(A2,1/24) and format with a time format which suits your
requirements.
Look up MROUND in Excel help.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top