In-line time addition

gregp63

New Member
Joined
Jul 9, 2015
Messages
12
Sure we've been through this before, so apologies.

I get a lot of raw data that comes to me as times - often along the lines of

"that task took 0:28:18 to set up, 0:05:13 to do and 0:23:11 to close down".

I just need to add the overall time into my model. Short of using a bunch of helper cells, is there and 'easy' way to do, as it were,

=0:28:18+0:05:13+0:23:11

?

Hope that makes sense, and isn't too inane a question.
 
helper cells in an out of sight location make life so easy, one for each time,, and a total. Saves hours of thinking time imho....
 
Upvote 0
Went with a UDF in the end.

Function TimeAdd(ParamArray aparams() As Variant)

Dim icount As Integer
TimeAdd = 0

Do While icount < UBound(aparams()) + 1
TimeAdd = TimeAdd + TimeValue(aparams(icount))
i count = icount + 1
Loop
End Function
 
Last edited:
Upvote 0
I just need to add the overall time into my model. Short of using a bunch of helper cells, is there and 'easy' way to do, as it were,
=0:28:18+0:05:13+0:23:11

="0:28:18" + "0:05:13" + "0:23:11"
or
=TIME(0,28,18) + TIME(0,5,13) + TIME(0,23,11)

formatted as Custom [h]:mm:ss . The use of [h] instead of simply h allows for a sum of time that is 24 hours or more.
 
Last edited:
Upvote 0
Your top solution's ideal. Didn't try it - was sceptical that it would actually work - thanks.

At least I got to brush up my UDF skills in the meantime :)
 
Upvote 0

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top