-
[EXCEL]summing times
I have a spreadsheet that has a column of times in the format hh:mm. They are not times like 12:00 AM, it would be more like 12 hours and 0 minutes. I want to add up all the times in visual basic, and have a variable that I can use, that has the total number of minutes in the column. Can anyone help?
-
Re: [EXCEL]summing times
It would be easier if you had it entered in a decimal format so it would be like 12.0 for 12 hours and no minutes or 3.75 for threee hours and 45 minutes. etc. Then it would be a simple SUM forumla.
-
Re: [EXCEL]summing times
if the cells are formated time then you can just sum the times
problem though, at 24 hrs starts again
if you have the total time in minutes you can easily calculate the time in hours from that
-
Re: [EXCEL]summing times
With Excel, you can do much easier than Access or other apps:
Format the cells with [h]:mm
then you can add or subtruct them as normal numbers.
Ex.: 16:38 + 9:23 = 26:01
If format the cells as h:mm, it will display 02:01 instead of 26:01
-
Re: [EXCEL]summing times
I ended up assigning the value of the cell to a variable that was declared as a date, using 'DatePart' to extract the hour and minute, and calculating the total minutes from that. Thanks though.:wave: