I found a UDF function to get me the difference between two time codes. I now need a UDF to Sum the time keeping the frames at the end. Below is the VBA for the function I am using to get the duration between two times:
Function frameDur(fEnd As String, fStart As String) As String
Dim ofEnd As Single, ofStart As Single, e1 As Single, e2 As Single
Dim Ans As String, AllAns As String, T2 As String
Const AddTim = 0.0000115741
Const DivTim = 2592000
ofStart = Format(Left(fStart, 8), "General Number")
e1 = Right(fStart, 2) / DivTim
ofEnd = Format(Left(fEnd, 8), "General Number")
e2 = Right(fEnd, 2) / DivTim
If e1 > e2 Then
ofStart = ofStart + AddTim
End If
Ans = Format((ofEnd) - (ofStart), "hh:mm:ss")
AllAns = Round(((ofEnd + e2) - (ofStart + e1)) * DivTim) / 30
T2 = Round((AllAns - 1 * Int(AllAns / 1)) * 30)
If T2 < 10 Then T2 = "0" & T2
frameDur = Ans & ":" & T2
End Function
I now need to add the total duration. I would like a UDF for it.
result should end up like this:
00:06:53:29
00:06:28:07
Total: 00:13:21:01
Any help is greatly appreciated!
Bookmarks