Hi, I would like to create a macro that will filter the data, but the problem is, I don't know exactly what the data will be in the file. For this purpose, I used a dictionary that goes through a given column and saves the keys that I want to filter later. Unfortunately, I don't know how to get data from this dictionary. Below, the loop that goes through the given column. I added Debug.Print to check if the dictionary is working properly.
VBA Code:
For Each key In dictCity.Keys
Set oCity = dictCity(key)
With oCity
Debug.Print key
ws1.Range("A1").Autofilter Field:=1, Criteria1:=key, Operator:=xlFilterValues
End With
Next key