#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 14
Default 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
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 846
Default 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

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,358
Default 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

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 15,768
Default 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



  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 14
Default Rounding Time values

Thanks for the help everyone!!


  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 8,651
Default 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



  #7   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,358
Default 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

  #8   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 15,768
Default Rounding Time values

You're welcome!

--
Biff
Microsoft Excel MVP


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



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Rounding Time. GEM Excel Worksheet Functions 7 July 31st 08 03:48 PM
Rounding time Learning Excel Excel Discussion (Misc queries) 2 November 17th 07 03:29 PM
Time rounding help Sanch Excel Discussion (Misc queries) 3 June 30th 06 06:37 PM
Rounding Time Darts Excel Discussion (Misc queries) 11 March 23rd 06 10:55 PM
Rounding of Time Morten Excel Worksheet Functions 2 August 5th 05 09:11 PM


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

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"