+ Reply to Thread
Results 1 to 2 of 2

rounding time formula

  1. #1
    Registered User
    Join Date
    12-01-2011
    Location
    Oregon
    MS-Off Ver
    Excel 2007
    Posts
    1

    rounding time formula

    This formula is for rounding the time up to nearest 15 min. increment, and rounding anything less than one hour up to one hour. The problem comes when the time is between 24 and 24:59...It returns 1. I only want 1 to appear if time is less than 1 hour. For example if time = 24 hr 0 min...1 is returned instead of 24.

    =IF((U4-INT(U4))*24<1,1/24,ROUNDUP(U4 * 96, 0) / 96)

    Basically does what I want unless the time is 24:00 to 24:59...Everything else seems to work.

    jw

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

    Re: rounding time formula

    doesn't just
    =CEILING(U4,1/96)
    work
    then again 24:00=00:00 so 24:01 is less than 01:00
    Last edited by martindwilson; 12-01-2011 at 07:35 PM.
    "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

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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