Hi All
I have a piece for of code for multiple filters. There's one thing im struggling with.
The macro is going to run each month and there's a filter on month code:
ActiveSheet.Range("$A$1:$A$1296").AutoFilter Field:=1, Criteria1:=Array("1", _
"2", "3", "4"), Operator:=xlFilterValues
the problem i have is that the filter will 'expand' each month. How can i make the criteria dynamic so next month it would be:
Criteria1:=Array("1", _
"2", "3", "4", "5")
i tried to use a string variable but as it was string, it has additional quotation marks: ""1", "2", "3", "4""...no values has been selected by the filter. The same resulted when i used an array of 1, 2, 3, 4) as parameter for the Criteria1
Does anyone has any suggestions how to tackle it?
Thanks
I have a piece for of code for multiple filters. There's one thing im struggling with.
The macro is going to run each month and there's a filter on month code:
ActiveSheet.Range("$A$1:$A$1296").AutoFilter Field:=1, Criteria1:=Array("1", _
"2", "3", "4"), Operator:=xlFilterValues
the problem i have is that the filter will 'expand' each month. How can i make the criteria dynamic so next month it would be:
Criteria1:=Array("1", _
"2", "3", "4", "5")
i tried to use a string variable but as it was string, it has additional quotation marks: ""1", "2", "3", "4""...no values has been selected by the filter. The same resulted when i used an array of 1, 2, 3, 4) as parameter for the Criteria1
Does anyone has any suggestions how to tackle it?
Thanks