Sub test() 'ce'st le bon
'dernière cellule non vide sur la colonne B
Derlig = Range("C" & Rows.Count).End(xlUp).Row
Dercol = Cells(4, Columns.Count).End(xlToLeft).Column
For Each C In Range(Cells(3, "F"), Cells(Derlig, Dercol))
'si valeur de la ligne 2 colonne = "X" alors
If Cells(2, C.Column) = "X" Then
C.Value = ""
C.Interior.ColorIndex = 16
End If
Next C
End Sub