1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38
| Private Sub Worksheet_Change(ByVal Target As Range)
'''''''''''''''''traiter cellule'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
Dim mCellule As Range
For Each mCellule In Target
If mCellule.Column = 13 And mCellule.Row > 4 Then
traiter_cellule mCellule
End If
Next mCellule
'''''''''''''''Format personnalise''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
If Not Application.Intersect(Target, Range("C5:C365, D5:D365, F5:F365, G5:G365")) Is Nothing Then
Select Case Len(Target)
Case 4
Target = TimeValue(Left(Target, 2) & ":" & Right(Target, 2))
Case 3
Target = TimeValue(Format(Left(Target, 1), "00") & ":" & Right(Target, 2))
Case 2
Target = TimeValue("00" & ":" & Target)
Case Else
End Select
End If
End Sub |
Partager