Bonjour,
Une autre proposition (pas regardé la proposition fanfan38 que je salue).
Cdlt.
Public Sub CopyData()
Dim ws As Worksheet, ws2 As Worksheet
Dim lo As ListObject
Dim tbl As Variant, arr() As Variant
Dim r As Range
Dim rw As Long, k As Long
Set ws = Worksheets("Data"): Set ws2 = Worksheets("Synthese")
For Each lo In ws.ListObjects
If lo.InsertRowRange Is Nothing Then
tbl = Range(lo).Value
For rw = 1 To UBound(tbl)
If tbl(rw, 1) = "x" Then
ReDim Preserve arr(2, k + 1)
arr(0, k) = tbl(rw, 2)
arr(1, k) = tbl(rw, 3)
k = k + 1
End If
Next rw
End If
Next lo
If k > 0 Then
Set lo = ws2.Range("synthese").ListObject
With lo
If .InsertRowRange Is Nothing Then
Set r = .HeaderRowRange.Cells(1).Offset(.ListRows.Count + 1)
Else
Set r = .InsertRowRange.Cells(1)
End If
End With
r.Resize(k, 2).Value = Application.Transpose(arr)
End If
End Sub