Public Function SUMIFNOTERROR(Cells() As Range) As Variant
Dim ReturnValue As Date
Dim Cell As Range
ReturnValue = TimeValue("00:00:00")
For Each Cell In Cells
If Cell.Value <> "#N/A" Or Cell.Value <> "#DIV/0" Or Cell.Value <> "#REF!" Then
ReturnValue = ReturnValue + Cell.Value
End If
Next Cell
SUMIFNOTERROR = TimeValue(ReturnValue)
End Function