Bonjour Lesuisse, le forum
ce petit code fonctionne, j'ai modifié le type de f car je pense que tu essayes de comparer des chiffres.
Cordialement, A+
Dim f As Long
f = Range("K7").Value
Dim Cell As Range
For Each Cell In Sheets("Overdue").Range("R2:R65536")
If Not (IsEmpty(Cell)) Then
Select Case Range("M7")
Case Is = ">"
If Cell.Value > f Then
Cell.Interior.ColorIndex = 8
Else
Cell.Interior.ColorIndex = xlNone
End If
Case Is = ">="
If Cell.Value >= f Then
Cell.Interior.ColorIndex = 8
Else
Cell.Interior.ColorIndex = xlNone
End If
Case Is = "<"
If Cell.Value < f Then
Cell.Interior.ColorIndex = 8
Else
Cell.Interior.ColorIndex = xlNone
End If
Case Is = "<="
If Cell.Value <= f Then
Cell.Interior.ColorIndex = 8
Else
Cell.Interior.ColorIndex = xlNone
End If
Case Is = "="
If Cell.Value = f Then
Cell.Interior.ColorIndex = 8
Else
Cell.Interior.ColorIndex = xlNone
End If
Case Else
End Select
End If
Next Cell