Private Sub Worksheet_Change(ByVal Target As Range)
Dim r As Range, v1$, v2$
Set r = Intersect(Target, Range("A2:B" & Rows.Count), Me.UsedRange)
If r Is Nothing Then Exit Sub
For Each r In r.EntireRow.Rows 'si plusieurs cellules sont modifiées
v1 = r.Cells(1).Text: v2 = r.Cells(2).Text
r.Interior.ColorIndex = IIf(v1 <> "" And v2 <> "" And v1 <> v2, 6, xlNone)
Next
End Sub