I need to be able to filter a list (which I get from an external database) with many filters. The list has in one colum a product code (about 5000 different ones) that repeats as many sales as each salesman made and I need to know who sold what so I made a macro that worked and looked it up in vba but I have a limit on a consult table cause I don't know how to make a string for tha array that will take only the values of the consulting items.
I speak spanish, sorry if I didn't explain myself very well.
so greatful for your help
Luis
Sub Filtrar3()
Dim Cadena(0 To 40) As String
Dim i As Variant
For i = 5 To Worksheets("Busqueda").Range("a1")
Cadena(i) = Worksheets("Busqueda").Cells(i, 1).Value
Next
ActiveSheet.ListObjects("Tabla_MOV001PRIMERA").Range.AutoFilter Field:=1, _
Criteria1:=Array(Cadena(1), Cadena(2), Cadena(3), Cadena(4), Cadena(5), _
Cadena(6), Cadena(7), Cadena(8), Cadena(9), Cadena(10), Cadena(11), Cadena(12), _
Cadena(13), Cadena(14), Cadena(15), Cadena(16), Cadena(17), Cadena(18), Cadena(19), _
Cadena(20)), Operator:=xlFilterValues
End Sub
Bookmarks