jerome91, le forum,
Feuille "Variables", mettre en commentaire la macro "Private Sub Worksheet_Change(ByVal Target As Range)"
et tester celle-ci pour voir si elle convient ...
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Address <> "$D$3" Then Exit Sub
Application.EnableEvents = False
Application.ScreenUpdating = False
Set fb = Sheets("base")
lgn = fb.Range("B5:B" & fb.Range("B" & Rows.Count).End(xlUp).Row).Find(Target, lookat:=xlWhole).Row
dercol = fb.Cells(5, Columns.Count).End(xlToLeft).Column
Range(Cells(9, 2), Cells(9, Cells(9, Columns.Count).End(xlToLeft).Column)).ClearContents
For Each n In [A9:M9]
n.Columns.Hidden = False
Next n
For j = 3 To dercol
If UCase(fb.Cells(lgn, j)) = "X" Then
colne = Application.Max(1, Cells(9, Columns.Count).End(xlToLeft).Column) + 1
Cells(9, colne) = fb.Cells(5, j)
End If
Next j
For Each n In [A9:M9]
If n <> "" Then
n.Columns.Hidden = False
Else
n.Columns.Hidden = True
End If
Next n
Application.EnableEvents = True
Application.ScreenUpdating = True
End Sub
LaCéline