Bonjour,
Me revoilà,
Il y a un bug dans la formule
Private Sub Worksheet_Change(ByVal Target As Excel.Range)
Dim TimeStr As String
If Not Application.Intersect(Target, Range("I8:J200")) Is Nothing Then
On Error GoTo EndMacro
If Target.Cells.Count > 9 Then Exit Sub
If Target.Value = "" Then Exit Sub
Application.EnableEvents = False
With Target
If .HasFormula = False Then
Select Case Len(.Value)
Case 1 To 4
TimeStr = .Value \ 100 & ":" & .Value Mod 100
Case 5, 6
TimeStr = .Value \ 10000 & ":" & (.Value Mod 10000) \ 100 & ":" _
& .Value Mod 100
Case Else
Err.Raise 0
End Select
.Value = TimeValue(TimeStr)
End If
End With
ElseIf Not Intersect(Target, Range("A8:A200")) Is Nothing Then
Application.EnableEvents = False
If Me.AutoFilterMode Then
If Me.AutoFilter Then Me.ShowAllData
End If
Range("A8:P200").Sort key1:=Range("A8"), order1:=xlAscending, Header:=xlNo
End If
Application.EnableEvents = True
Exit Sub
EndMacro:
MsgBox "You did not enter a valid time"
Application.EnableEvents = True
End Sub
Pouvez-vous encore une fois aider une pauvre débutante
Merci