I have written such a VBA function in my Excel worsheet:
Public Function total(rng As Range, ByVal sgn As String) As Date Dim hrs As Date hrs = 0 For Each