+ Reply to Thread
Results 1 to 9 of 9

Round to nearest 4 hours

  1. #1
    Registered User
    Join Date
    11-08-2013
    Location
    London
    MS-Off Ver
    Excel 2010
    Posts
    11

    Round to nearest 4 hours

    Hi,

    I have a sheet that automatically works out the number of hours assigned to a job form a list of many items, i want the total to automatically round to the nearest 4 hours.

    All help is much appreciated.

    Ben

  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: Round to nearest 4 hours

    if its real times eg 31:00:00
    then maybe
    =MROUND(A1,4/24)
    "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

  3. #3
    Forum Guru benishiryo's Avatar
    Join Date
    03-25-2011
    Location
    Singapore
    MS-Off Ver
    Excel 2013
    Posts
    5,147

    Re: Round to nearest 4 hours

    welcome to the forum, Ben. say your hours are in A1, try:
    =MROUND(A1,"4:00")

    or replace A1 with the existing formula that works out the number of hours. you also need to format the cells as:
    [h]:mm
    this is so that you can see more than 24 hours

    Thanks, if you have clicked on the * and added our rep.

    If you're satisfied with the answer, click Thread Tools above your first post, select "Mark your thread as Solved".

    "Contentment is not the fulfillment of what you want, but the realization of what you already have."


    Tips & Tutorials I Compiled | How to Get Quick & Good Answers

  4. #4
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,770

    Re: Round to nearest 4 hours

    May be this…

    In A1 Cell
    10:23 AM

    In B1 Cell

    =TIME(FLOOR(HOUR(A1),4),0,0)

    Or

    =TIME(CEILING(HOUR(A1),4),0,0)


    If your problem is solved, then please mark the thread as SOLVED>>Above your first post>>Thread Tools>>
    Mark your thread as Solved


    If the suggestion helps you, then Click *below to Add Reputation

  5. #5
    Registered User
    Join Date
    11-08-2013
    Location
    London
    MS-Off Ver
    Excel 2010
    Posts
    11

    Re: Round to nearest 4 hours

    Thanks for the responses, the numbers are not in a time format, they are just a total amount of hours, so A1 =21, this is 21 hours, but i want it rounded up to the nearest whole number divisible by 4, so in this example it would be 24. If A1= 11 it would be 12.

  6. #6
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,770

    Re: Round to nearest 4 hours

    =ceiling(a1,4)

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

    Re: Round to nearest 4 hours

    =CEILING(A1,4) then

  8. #8
    Registered User
    Join Date
    11-08-2013
    Location
    London
    MS-Off Ver
    Excel 2010
    Posts
    11

    Re: Round to nearest 4 hours

    Thanks all, i have not heard of ceiling before, i will use that time and time again.

  9. #9
    Valued Forum Contributor
    Join Date
    10-29-2012
    Location
    Mojokerto,Indonesia
    MS-Off Ver
    Excel 2007
    Posts
    554

    Re: Round to nearest 4 hours

    =CEILING(A1,4/24)
    format as time

+ 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. Replies: 5
    Last Post: 09-05-2013, 04:59 PM
  2. Need help with weekly timesheet to round all hours to nearest 1/4 hours
    By markjoel777 in forum Excel Formulas & Functions
    Replies: 12
    Last Post: 06-16-2013, 12:19 AM
  3. [SOLVED] Round Cell to Nearest 0.25 up-to 1.0 then to nearest 0.5
    By haynesc87 in forum Excel General
    Replies: 4
    Last Post: 05-30-2012, 01:38 PM
  4. How: Round to nearest 25
    By blank in forum Excel General
    Replies: 4
    Last Post: 06-24-2006, 05:45 PM
  5. Round to nearest 5?
    By Confused Man in forum Excel General
    Replies: 5
    Last Post: 07-06-2005, 02:05 AM

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