J
John
I am having a challenge with the following code. It has an issue with the
advanced filter. Does anyone know if it is possible to apply an advanced
filter on a union of ranges?
Sub TestIt()
Dim r1 As Range, r2 As Range, myMultiAreaRange As Range
Worksheets("sheet1").Activate
Set r1 = Range("A4:A9")
Set r2 = Range("D4:E9")
Set myMultiAreaRange = Union(r1, r2)
'myMultiAreaRange.Select
myMultiAreaRange.AdvancedFilter Action:=xlFilterCopy, _
CriteriaRange:=ThisWorkbook.Sheets("Sheet1").Range("R_Criteria"), _
CopyToRange:=ThisWorkbook.Sheets("Sheet1").Range("H4:J4"), Unique:=False
End Sub
advanced filter. Does anyone know if it is possible to apply an advanced
filter on a union of ranges?
Sub TestIt()
Dim r1 As Range, r2 As Range, myMultiAreaRange As Range
Worksheets("sheet1").Activate
Set r1 = Range("A4:A9")
Set r2 = Range("D4:E9")
Set myMultiAreaRange = Union(r1, r2)
'myMultiAreaRange.Select
myMultiAreaRange.AdvancedFilter Action:=xlFilterCopy, _
CriteriaRange:=ThisWorkbook.Sheets("Sheet1").Range("R_Criteria"), _
CopyToRange:=ThisWorkbook.Sheets("Sheet1").Range("H4:J4"), Unique:=False
End Sub