Adding unformatted time like 0:00:00 using VBA

l33tn4

New Member
Joined
Apr 17, 2013
Messages
5
ok so i need VBA to add time when it is formatted as 00:00:00 (e.i. hours:minutes:seconds) and output a total value. Normally i would have some code to show but with this one i just don't know where to start. any ideas or help would be nice.
 

Excel Facts

Links? Where??
If Excel says you have links but you can't find them, go to Formulas, Name Manager. Look for old links to dead workbooks & delete.
Code:
msgbox format(worksheetfunction.Sum(range("A1:A10").value), "h:mm:ss")
 
Upvote 0
ummm that might work but i am getting very specific information using a number of loops and if then's. so i would have to be in a way in which i could be out in a loop like x = x + 1 is kind of the method that i always use. having a variable that is constantly being add to each other. any ideas? if not i was just going to break down each part add them together and into time notation over the loop is over.
 
Upvote 0
... but i am getting very specific information using a number of loops and if then's.
I could do no more than guess what what you're trying to do. Perhaps instead you could explain it.
 
Upvote 0

Forum statistics

Threads
1,214,782
Messages
6,121,532
Members
449,037
Latest member
tmmotairi

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