ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Rounding Time values (https://www.excelbanter.com/excel-discussion-misc-queries/206288-rounding-time-values.html)

mebsmith

Rounding Time values
 
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

Brad

Rounding Time values
 
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)

"mebsmith" wrote:

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


John C[_2_]

Rounding Time values
 
=ROUND(A1*24,0)/24
This assumes A1 is a time only (no time/date).

Hope this helps.
--
John C


"mebsmith" wrote:

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


T. Valko

Rounding Time values
 
Try this:

A1 = 6:40:00 AM

=ROUND(A1*24,0)/24

Result = 7:00:00 AM

--
Biff
Microsoft Excel MVP


"mebsmith" wrote in message
...
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




mebsmith

Rounding Time values
 
Thanks for the help everyone!!

David Biddulph[_2_]

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

"mebsmith" wrote in message
...
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




John C[_2_]

Rounding Time values
 
*sigh*
--
John C


"John C" wrote:

=ROUND(A1*24,0)/24
This assumes A1 is a time only (no time/date).

Hope this helps.
--
John C


"mebsmith" wrote:

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


T. Valko

Rounding Time values
 
You're welcome!

--
Biff
Microsoft Excel MVP


"mebsmith" wrote in message
...
Thanks for the help everyone!!





All times are GMT +1. The time now is 10:57 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com