I am trying to create a filter that will filter values gathered by a dynamic array. The below code works for this, however it is also including blank values when filtering. If I add a second cirteria, this does not seem to work either. any help would be appreciated.
Sub AppToServerFilter()
Dim Apps() As String, size As Integer, i As Integer
'creates an array and fills it with values in the checksheet
With Sheets("CheckSheet")
Sheets("CheckSheet").Activate
size = WorksheetFunction.CountA(Worksheets("CheckSheet").Columns(1))
ReDim Apps(size)
For i = 1 To size
Apps(i) = Cells(i, 1).Value
Next i
End With
'Commented out the array print
'For i = LBound(Apps) To UBound(Apps)
'txt = txt & Apps(i) & vbCrLf
'Next i
'MsgBox txt
'filters for all values in the array created above
Worksheets("App-to-Server").Select
'Range("A6").AutoFilter
'Range("A6").AutoFilter Field:=8, Criteria1:=Apps(), Operator:=xlFilterValues
ActiveSheet.ListObjects("Table1").Range.AutoFilter Field:=8, Criteria1:=Apps(), Operator:=xlFilterValues
End Sub