Bonjour,
Bonjour à tous,
Une autre proposition, similaire à gmb.
Bonne fêtes de fin d'année.
Cdlt.
Option Explicit
Private Sub cmdConsolidate_Click()
Dim tbl, arr()
Dim lRow As Long, k As Long
Dim I As Long, J As Long
Application.ScreenUpdating = False
Feuil2.Cells(1).CurrentRegion.ClearContents
tbl = Feuil1.Cells(4, 1).CurrentRegion.Value
k = 0
For I = 2 To UBound(tbl, 1)
For J = 2 To UBound(tbl, 2)
If UCase(tbl(I, J)) = "X" Then
ReDim Preserve arr(2, k + 1)
arr(0, k) = tbl(I, 1)
arr(1, k) = tbl(1, J)
k = k + 1
End If
Next J
Next I
With Feuil2
If k > 0 Then .Cells(1).Resize(UBound(arr, 2), 2).Value = _
Application.Transpose(arr)
.Activate
End With
Erase arr(): Erase tbl
End Sub