+ Reply to Thread
Results 1 to 11 of 11

Round the time

  1. #1
    Registered User
    Join Date
    04-24-2004
    Location
    INDIA
    MS-Off Ver
    2013
    Posts
    70

    Round the time

    I HAVE TIME SHEET IN EXCEL 2002

    A1 = 07:00 AM
    B1 = 11:16 AM

    C1 = 04:16 (A1-B1)

    How can i round 04.16 in 30 minutes interval.

    Thanks

    Skaran
    Last edited by kumawat_s; 10-04-2013 at 09:07 AM.

  2. #2
    Registered User
    Join Date
    10-03-2012
    Location
    Denmark
    MS-Off Ver
    Excel 2016
    Posts
    38

    Re: Round the time

    Try "=(ROUNDUP((B1-A1)*24*2,0))/(24*2)"

  3. #3
    Valued Forum Contributor
    Join Date
    09-15-2011
    Location
    Chennai, India
    MS-Off Ver
    Excel 2010
    Posts
    436

    Re: Round the time

    Please try this file.
    Attached Files Attached Files
    Please click 'Add reputation', if my answer helped you.

  4. #4
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Round the time

    =mround(b1-a1,"0:30")
    "Unless otherwise stated all my comments are directed at OP"

    Mojito connoisseur and now happily retired
    where does code go ?
    look here
    how to insert code

    how to enter array formula

    why use -- in sumproduct
    recommended reading
    wiki Mojito

    how to say no convincingly

    most important thing you need
    Martin Wilson: SPV
    and RSMBC

  5. #5
    Registered User
    Join Date
    10-03-2012
    Location
    Denmark
    MS-Off Ver
    Excel 2016
    Posts
    38

    Re: Round the time

    MROUND rounds to the closed Fix. With Timesheets, I would expect a roundup to be more common, but please use whichever suits your requirements.

  6. #6
    Registered User
    Join Date
    04-24-2004
    Location
    INDIA
    MS-Off Ver
    2013
    Posts
    70

    Re: Round the time

    Thanks. It is working in Excel XP.

    Could you please eloborate the function (first we multiplied 24*2 and then divided)

  7. #7
    Registered User
    Join Date
    10-03-2012
    Location
    Denmark
    MS-Off Ver
    Excel 2016
    Posts
    38

    Re: Round the time

    Hi

    Time in Excel is shown as a fraction of a Day. My multiplying by 24, I now have the Units as hours. Take any number, double it and round it up to zero decimal places and you will get an odd or even result. Divide that by 2 again and you will have a number that is either x.0 or x.5. Divide that again by 24 and you have got back to how Excel stores time values.

    Run it on some test data, stage by stage.

    Stephen

  8. #8
    Registered User
    Join Date
    10-03-2012
    Location
    Denmark
    MS-Off Ver
    Excel 2016
    Posts
    38

    Re: Round the time

    Just in case you ever need it, if you did "=(ROUNDUP((B1-A1)*24*4,0))/(24*4)" you would then be rounding to the next 15minute point on the clock.

  9. #9
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Round the time

    =CEILING(b1-A1,"00:30") to round up

  10. #10
    Registered User
    Join Date
    10-03-2012
    Location
    Denmark
    MS-Off Ver
    Excel 2016
    Posts
    38

    Re: Round the time

    Quote Originally Posted by martindwilson View Post
    =CEILING(b1-A1,"00:30") to round up
    Nice. Actually ... "nicer!"

  11. #11
    Registered User
    Join Date
    04-24-2004
    Location
    INDIA
    MS-Off Ver
    2013
    Posts
    70

    Re: Round the time

    Thanks. It is working in Excel XP.

    Could you please eloborate the function (first we multiplied 24*2 and then divided)

    Quote Originally Posted by stephenkeefe View Post
    Try "=(ROUNDUP((B1-A1)*24*2,0))/(24*2)"

+ 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. [SOLVED] round up time unless already at the desired time value
    By mattgoudey in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 03-13-2013, 10:20 AM
  2. [SOLVED] Round Time?
    By mycon73 in forum Excel General
    Replies: 3
    Last Post: 09-22-2012, 11:06 AM
  3. round the time
    By legepe in forum Excel General
    Replies: 2
    Last Post: 03-04-2010, 09:27 AM
  4. [SOLVED] Round down for time
    By Shadowman13 in forum Excel General
    Replies: 3
    Last Post: 05-20-2005, 07:06 PM
  5. Round UP Time
    By carl in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 01-07-2005, 01:06 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