+ Reply to Thread
Results 1 to 4 of 4

Rounding up hh:mm:ss time values in VBA

  1. #1
    Registered User
    Join Date
    01-29-2007
    Posts
    42

    Rounding up hh:mm:ss time values in VBA

    Hello all,

    I'm having a bit of trouble getting a line of code to work. I want to grab a time value from the worksheet (formatted in hh:mm:ss), round it up to the nearest minute, then add another full minute to it.

    In the worksheet, I've used this, which works fine, but I'd like it handled by VBA so I can free up the cell. C1 is the source cell with the time value:

    =(CEILING(C1,"00:01:00"))+"00:01:00"

    In VBA, I've been trying to use:

    Please Login or Register  to view this content.
    Doesn't like it.

    Anyone point me in the right direction?

    Ta in advance.

  2. #2
    Forum Expert CK76's Avatar
    Join Date
    06-16-2015
    Location
    ONT, Canada
    MS-Off Ver
    Office 365 ProPlus
    Posts
    5,855

    Re: Rounding up hh:mm:ss time values in VBA

    Try...
    Please Login or Register  to view this content.
    ?Progress isn't made by early risers. It's made by lazy men trying to find easier ways to do something.?
    ― Robert A. Heinlein

  3. #3
    Registered User
    Join Date
    01-29-2007
    Posts
    42

    Re: Rounding up hh:mm:ss time values in VBA

    Outstanding. Easy when you know how

    Thanks - calling this solved.

  4. #4
    Forum Expert CK76's Avatar
    Join Date
    06-16-2015
    Location
    ONT, Canada
    MS-Off Ver
    Office 365 ProPlus
    Posts
    5,855

    Re: Rounding up hh:mm:ss time values in VBA

    You are welcome

+ 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] Rounding up time
    By ladypickers in forum Excel Formulas & Functions
    Replies: 18
    Last Post: 02-09-2019, 05:16 AM
  2. [SOLVED] Hi & Rounding down time when the calculated time is negative
    By MrMaster in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 04-13-2016, 02:15 AM
  3. Time Values and Rounding
    By Kwarren in forum Excel General
    Replies: 5
    Last Post: 01-24-2012, 05:11 PM
  4. Rounding Up Time Values
    By frith in forum Excel General
    Replies: 2
    Last Post: 11-15-2011, 06:01 PM
  5. Rounding up/down of time values
    By Mike_Dean in forum Excel General
    Replies: 7
    Last Post: 05-20-2008, 08:05 PM
  6. 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
  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

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