Gruppe
Allgemein
Problem
Die sichtbaren Zellen der gefilterten Daten sollen in ein Array ein- und aus diesem ausgelesen werden.
StandardModule: Modul1
Sub FilterIndex()
Dim rng As Range
Dim arr As Variant
Dim iRow As Integer, iCol As Integer
Dim iRowC As Integer, iColC As Integer
Application.ScreenUpdating = False
Set rng = Range("A1").CurrentRegion _
.SpecialCells(xlCellTypeVisible)
Workbooks.Add
rng.Copy Range("A1")
Rows(1).Delete
arr = Range("A1").CurrentRegion
With Range("A1").CurrentRegion
iRowC = .Rows.Count
iColC = .Columns.Count
End With
ActiveWorkbook.Close savechanges:=False
For iRow = 1 To iRowC
For iCol = 1 To iColC
MsgBox arr(iRow, iCol)
Next iCol
Next iRow
Application.ScreenUpdating = True
End Sub