Hi
If I have VBA below to do an advanced filter. Was wondering how can I use a filter formula instead
I know I can use individual formulas in L2, M2, N2 etc
But I want the formula to account for values in different cells in the criteria F1:j2 which the below code does. I don't know which cells in the criteria will have value it could be 1 of them 2, 3 or even all 4
If I have VBA below to do an advanced filter. Was wondering how can I use a filter formula instead
I know I can use individual formulas in L2, M2, N2 etc
But I want the formula to account for values in different cells in the criteria F1:j2 which the below code does. I don't know which cells in the criteria will have value it could be 1 of them 2, 3 or even all 4
VBA Code:
Sheets("sheet1").Range("A1") _
.CurrentRegion.AdvancedFilter _
Action:=xlFilterCopy, _
CriteriaRange:=Sheets("sheet2") _
.Range("F1:J2"), _
CopyToRange:=Sheets("sheet2") _
.Range("L1:P1"), _
Unique:=False