Hi
I have range of cells having time.
each cell showing time like 18:18-23:15
I have created a UDF to find the sum of time difference
Private Function SUMTIME(Rng As String)
Dim Ans As Double
Dim St,En As Double
For Each cl In Rng
If cl <> "" Then
St = Left(cl, 5)
En = Right(cl, 5)
Ans = Ans + (En - St)
End If
Next cl
SUMTIME = Ans
End Function
but its showing error, please help
I have range of cells having time.
each cell showing time like 18:18-23:15
I have created a UDF to find the sum of time difference
Private Function SUMTIME(Rng As String)
Dim Ans As Double
Dim St,En As Double
For Each cl In Rng
If cl <> "" Then
St = Left(cl, 5)
En = Right(cl, 5)
Ans = Ans + (En - St)
End If
Next cl
SUMTIME = Ans
End Function
but its showing error, please help