Private Sub Worksheet_Change(ByVal Target As Range)
Dim DiffTage As Integer
If Target.Address = "$G$3" Then
If Left(Target.Value, 1) = "h" Then
If Len(Target) > 1 Then
DiffTage = CInt(Right(Target, Len(Target) - 1))
End If
Target.Value = Date + DiffTage
End If
ElseIf Target.Address = "$C$5" Then
Application.EnableEvents = False
With Target
.Value = CDate(Left(Format(Target, "0000"), 2) & ":" & Right(Target, 2))
.NumberFormat = "[hh]:mm"
End With
Application.EnableEvents = True
End If
End Sub