Option Explicit
Function PremInf(Valeur As Long, Z As String) As Variant
Dim V As Variant, N As Long
V = Split(Z, ",")
PremInf = ""
For N = 0 To UBound(V)
If V(N) < Valeur Then PremInf = V(N) + 0: Exit Function
Next N
End Function
Function PremSup(Valeur As Long, Z As String) As Variant
Dim V As Variant, N As Long
V = Split(Z, ",")
PremSup = ""
For N = 0 To UBound(V)
If V(N) > Valeur Then PremSup = V(N) + 0: Exit Function
Next N
End Function
=PremInf($B5;$E5)
=PremSup($B5;$E5)
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Column = 7 Then
Application.EnableEvents = False
Me.Cells(Target.Row, 8).Value = Date
Me.Cells(Target.Row, 9).Value = Now
Application.EnableEvents = True
ElseIf Target.Column = 10 Then
Application.EnableEvents = False
Me.Cells(Target.Row, 11).Value = Date
Me.Cells(Target.Row, 12).Value = Now
Application.EnableEvents = True
End If
End Sub