Hi all,
I am currently using autofilter in a macro to move data over that = certain text.
I now need to be able to say if column 6 = Test1 OR column 2 = Test2 OR column 3 = Test3.
I know how to do this with the or operator when its looking in the same column each time but not with different columns. All suggestions welcome thanks for your help.
I am currently using autofilter in a macro to move data over that = certain text.
Code:
With Sheets("Data")
If .AutoFilterMode Then .AutoFilterMode = False
.Range("A1:O1").AutoFilter 6, "Test1"
.Range("A1:O1").AutoFilter 2, "Test2"
.Range("A1:O1").AutoFilter 3, "Test3"
.AutoFilter.Range.Offset(1).Copy Sheets("Results").Range("A2")
.AutoFilterMode = False
End With
I now need to be able to say if column 6 = Test1 OR column 2 = Test2 OR column 3 = Test3.
I know how to do this with the or operator when its looking in the same column each time but not with different columns. All suggestions welcome thanks for your help.