Results 1 to 7 of 7

SUM range of time

Threaded View

  1. #2
    Forum Expert Greg M's Avatar
    Join Date
    08-16-2007
    Location
    Dublin. Ireland
    MS-Off Ver
    Office 2016
    Posts
    4,641

    Re: SUM range of time

    Hi there,

    I think you've probably come up against a genuine Excel vs VBA BUG!

    Cell C367 is correctly formatted to display ELAPSED time ("[hh]:mm"), so its value of 2.534... is displayed as 60:50. When formatted as hh:mm the value displayed is 12:50 - i.e. the same as appears on your UserForm.

    BUT - it appears that this NumberFormat is not supported in VBA. I thought it would be simply a matter of changing the NumberFormat in your code to [hh]:mm, but that just doesn't seem to work:

    
    "Total time - C column : " & Format(WorksheetFunction.Sum(Range("C1:C365")), "hh:mm") & " h"

    I'd be quite happy to be proved wrong by any experts out there!

    Regards,

    Greg M
    Last edited by Greg M; 08-25-2015 at 10:41 AM. Reason: Minor addition

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] COUNTIF Time Range - Time Range provided in Cells
    By Eaks77 in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 02-02-2015, 11:12 PM
  2. [SOLVED] Counting values in a time range - when the time range crosses midnight
    By dlocos in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 02-24-2014, 04:27 AM
  3. Create a Time Range off Time Stamps, and Count Intersecting values
    By athyeh in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-21-2014, 05:07 PM
  4. Calculate if Time range appears in an other Time range
    By bajdr47 in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 11-25-2013, 02:50 AM
  5. compare time values - current time with time in cell range?
    By wyattea in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 09-13-2013, 11:28 PM
  6. send to range, popup box to input what the range should be each time/select range
    By lax2734 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-26-2012, 01:37 AM
  7. Display the date and time each time the data in a cell range is changed
    By BVZM in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 08-24-2012, 01:23 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