Hi
Have a look at the autofilter object. There is some example code that should help you. The code below is based on that...
Sub bbba()
Dim filterArray()
With Sheets("Sheet1").AutoFilter.Filters
ReDim filterArray(1 To .Count, 1 To 3)
For i = 1 To .Count
If .Item(i).On Then
filterArray(i, 1) = .Item(i).Criteria1
If .Item(i).Operator Then
filterArray(i, 2) = .Item(i).Operator
filterArray(i, 3) = .Item(i).Criteria2
End If
End If
Next i
End With
For i = 1 To UBound(filterArray)
For J = 1 To 3
If filterArray(i, J) <> "" Then
Debug.Print i & ", " & J & ", " & filterArray(i, J)
End If
Next J
Next i
End Sub
rylo
Bookmarks