Sub CreerTableauAPartirCellulesVisibles()
Dim TS As ListObject, xrg As Range, arr, xarea, t
Dim max As Long, i As Long, n As Long, j As Long
Set TS = Sheets("GrandLivre").Range("a2").ListObject
On Error Resume Next
Set xrg = TS.DataBodyRange.SpecialCells(xlCellTypeVisible)
On Error GoTo 0
If Not xrg Is Nothing Then
For Each xarea In xrg.Areas: max = max + xarea.Rows.Count: Next xarea
ReDim arr(1 To max, 1 To TS.ListColumns.Count)
For Each xarea In xrg.Areas
t = xarea.Value
For i = 1 To UBound(t)
n = n + 1
For j = 1 To TS.ListColumns.Count: arr(n, j) = t(i, j): Next j
Next i
Next xarea
End If
'affichage en A1 de la feuille Résultat pour vérification
Sheets("Résultat").Range("a1").CurrentRegion.Clear
If max > 0 Then Sheets("Résultat").Range("a1").Resize(UBound(arr), UBound(arr, 2)) = arr
Application.Goto Sheets("Résultat").Range("a1"), True
End Sub