Private Sub Worksheet_SelectionChange(ByVal target As Range)
Dim Cel As Range
Cells.Interior.ColorIndex = xlNone 'met toutes les cellules sur fond blanc
'chaque cellule de la colonne correpondant à la cellule active est coloriée en jaune clair(19)
'je colore l'en-tête de la colonne
Cells(1, target.Column).Interior.ColorIndex = 19
For i = 2 To 150
' si sa valeur est egale à "X".
If Cells(i, target.Column) = "x" Then
Cells(i, target.Column).Interior.ColorIndex = 19
Cells(i, 1).Interior.ColorIndex = 19
End If
Next i
End Sub