Function sommeHeures(h1 As String, h2 As String) As String
Dim temp() As String, temp2() As String
Dim sommeH As Integer, sommeM As Integer
temp = Split(h1 & "h", "h")
temp2 = Split(h2 & "h", "h")
sommeH = Val(temp(0)) + Val(temp2(0))
If Val(temp(1)) + Val(temp2(1)) >= 60 Then
sommeM = (Val(temp(1)) + Val(temp2(1))) Mod 60
sommeH = sommeH + 1
Else
sommeM = Val(temp(1)) + Val(temp2(1))
End If
If sommeM = 0 Then
sommeHeures = sommeH & "h00"
Else
sommeHeures = sommeH & "h" & sommeM
End If
End Function
Function comparerHeures(h1 As String, h2 As String) As Boolean
Dim temp() As String, temp2() As String
temp = Split(h1 & "h", "h")
temp2 = Split(h2 & "h", "h")
If Val(temp(0)) < Val(temp2(0)) Then
comparerHeures = True
ElseIf Val(temp(0)) = Val(temp2(0)) Then
If Val(temp(1)) <= Val(temp2(1)) Then
comparerHeures = True
Else
comparerHeures = False
End If
Else
comparerHeures = False
End If
End Function