+ Reply to Thread
Results 1 to 9 of 9

Rounding For Time

  1. #1
    Forum Contributor
    Join Date
    07-06-2013
    Location
    Borneo
    MS-Off Ver
    2016
    Posts
    277

    Rounding For Time

    Dear Experts

    I have a time calculation, and need to be rounded, could you help me how to round for it as per sample

    rounding.xlsx
    Last edited by azbi; 11-27-2015 at 06:47 AM.

  2. #2
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Rounding For Time

    Like this...

    =CEILING((A2+C2)-(A2+B2),30/1440)

    Format as h:mm if needed.
    Biff
    Microsoft MVP Excel
    Keep It Simple Stupid

    Let's Go Pens. We Want The Cup.

  3. #3
    Forum Contributor
    Join Date
    07-06-2013
    Location
    Borneo
    MS-Off Ver
    2016
    Posts
    277

    Re: Rounding For Time

    Dear Mr. Tony

    Almost perfect, but for result that has mention 30 minute, shouldn't be changed (in cell D10)

  4. #4
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Rounding For Time

    That particular example is caused by an internal "rounding error". So, you'll have to use double rounding...

    =CEILING(ROUND((A2+C2)-(A2+B2),10),30/1440)

  5. #5
    Forum Contributor
    Join Date
    07-06-2013
    Location
    Borneo
    MS-Off Ver
    2016
    Posts
    277

    Re: Rounding For Time

    Dear Mr. Tonny

    Thanks alot, its work

  6. #6
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Rounding For Time

    You're welcome. Thanks for the feedback!

  7. #7
    Forum Contributor
    Join Date
    07-06-2013
    Location
    Borneo
    MS-Off Ver
    2016
    Posts
    277

    Re: Rounding For Time

    Dear Mr. Tony

    Sorry to ask again, there's one problem again, if result of the calculation is one hour, using that formula become 1 hour and 30 minute, could it be corrected?

  8. #8
    Forum Guru samba_ravi's Avatar
    Join Date
    07-26-2011
    Location
    Hyderabad, India
    MS-Off Ver
    Excel 2021
    Posts
    8,914

    Re: Rounding For Time

    D2=TIME(HOUR(C2-B2),CEILING(MINUTE(C2-B2),30),)
    Please Login or Register  to view this content.
    Try this and copy towards down
    Samba

    Say thanks to those who have helped you by clicking Add Reputation star.

  9. #9
    Forum Contributor
    Join Date
    07-06-2013
    Location
    Borneo
    MS-Off Ver
    2016
    Posts
    277

    Re: Rounding For Time

    Dear nflsales

    Correct, and works..

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Rounding time to 0.50 and not 0.30
    By Mooks_83 in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 02-25-2014, 10:53 AM
  2. Rounding down time
    By khank in forum Excel General
    Replies: 2
    Last Post: 03-05-2011, 06:59 PM
  3. Converting military time to decimal time not rounding correctly
    By Sean Anderson in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 01-23-2008, 09:12 PM
  4. Rounding of Time
    By RagDyer in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 09-06-2005, 07:05 PM
  5. Rounding of Time
    By Morten in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 12:05 PM
  6. [SOLVED] Rounding of Time
    By Morten in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 02:05 AM
  7. Rounding Time Intervals to the Nearest Specified Time Increment
    By ExcelTip in forum Tips and Tutorials
    Replies: 0
    Last Post: 08-23-2005, 12:21 PM
  8. [SOLVED] Rounding of Time
    By Morten in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 08-05-2005, 05:05 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1