+ Reply to Thread
Results 1 to 4 of 4

Rounding to nearest half hour

  1. #1
    Registered User
    Join Date
    05-21-2010
    Location
    Texas, USA
    MS-Off Ver
    Excel 2007
    Posts
    6

    Rounding to nearest half hour

    Does anyone know how to create a formula that will round time values to the nearest half hour and show only one decimal place? For example....1.25 hours would round to 1.5 hours.
    Last edited by kjambug; 11-11-2010 at 03:12 PM.

  2. #2
    Valued Forum Contributor squiggler47's Avatar
    Join Date
    02-17-2009
    Location
    Littleborough, UK
    MS-Off Ver
    Excel 3.0 to 2007+2010! (couldnt get 2.1 working)
    Posts
    1,013

    Re: Rounding to nearest half hour

    Assuming your values are 1.25 rather than 1:15

    =ROUND(B2*2,0)/2
    Regards
    Darren

    Update 12-Nov-2010 Still job hunting!

    If you are happy with the results, please add to our reputation by clicking the blue scales icon in the blue bar of the post.

    Learn something new each day, Embrace change do not fear it, evolve and do not become extinct!


  3. #3
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    2016
    Posts
    14,675

    Re: Rounding to nearest half hour

    If you have the hours in decimal in A1 then try this formula in B1

    =MROUND(A1,0.5)
    Audere est facere

  4. #4
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,578

    Re: Rounding to nearest half hour

    Okay, looks like you have the cell formatted to general and not to time. Is that correct?
    Try this
    =CEILING(A2-0.25,0.5)

    Edit: I always forget MROUND. Do that.
    ChemistB
    My 2?

    substitute commas with semi-colons if your region settings requires
    Don't forget to mark threads as "Solved" (Edit First post>Advanced>Change Prefix)
    If I helped, Don't forget to add to my reputation (click on the little star at bottom of this post)

    Forum Rules: How to use code tags, mark a thread solved, and keep yourself out of trouble

+ 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