Option Compare Text 'la casse est ignorée
Sub Mettre_X()
Dim nom$, jour$, tablo, ncol%, i&, j%
nom = "G" 'à adapter
jour = "vendredi" 'à adapter
Application.ScreenUpdating = False
With Feuil1 'CodeName de la feuille
If .FilterMode Then .ShowAllData 'si la feuille est filtrée
With .UsedRange
.Replace "X", "", xlWhole 'efface les "X"
tablo = .Formula
If Not IsArray(tablo) Then Exit Sub 'sécurité
ncol = UBound(tablo, 2)
For i = 2 To UBound(tablo)
If tablo(i, 1) = nom Then
If tablo(i, 2) = "Oui" Then
For j = 3 To ncol
If tablo(1, j) = jour Then tablo(i, j) = "X"
Next j
End If
End If
Next i
.Formula = tablo
End With
End With
End Sub