Hi Yasser,
Thanks for the rep!
This seems to work:
![]()
Sub CopyTableII(): Dim WT, n As Long, c As Long, s As Long Dim R As Range, UR As Range: Set UR = ActiveSheet.UsedRange WT = Cells(20, 2).Resize(UR.Rows.count, UR.Columns.count) s = 1: n = 1 For Each R In UR.SpecialCells(xlCellTypeVisible) WT(s, n) = R.Value: n = n + 1 If n = UR.Columns.count + 1 Then s = s + 1: n = 1 Next Cells(20, 2).Resize(s, UR.Columns.count) = WT End Sub
Bookmarks