I have a 3row x 4col "Table1" including headers in Range("A1:D4") with row 3 and column C filtered out or hidden. Here are the VBA coes
Array vTable above has only 1 row and 2 columns containing cells A2 and B2.
My question is:
Any simple way (in one VBA statement) to get a vTable with all the visible cells 2 rows x 3 columns with A2, B2, D2, A4, B4 and D4 without looping through the rows
I am afraid the answer is No ?
Code:
Dim oTable as Listobject, vTable as Variant, oListRow as ListRow
Range("A2").Activate
Set oTable = ActiveCell.ListObject
vTable = oTable.DataBodyRange.SpecialCells(xlCellTypeVisible)
Array vTable above has only 1 row and 2 columns containing cells A2 and B2.
My question is:
Any simple way (in one VBA statement) to get a vTable with all the visible cells 2 rows x 3 columns with A2, B2, D2, A4, B4 and D4 without looping through the rows
Code:
For each oListRow in oTable.ListRows
For i =....etc
For j =....etc
vTable(i, j) =....etc
Next J
Next i
Next oListRow
I am afraid the answer is No ?