![]() |
Numerous OR criteria in a Filtered Macro
Hi All!
I am trying to dump records from one worksheet into another, but am trying to look for 8 different OR's in one go, as I would like the data to be pasted as one block. I have used so far: Selection.AutoFilter Selection.AutoFilter Field:=3, Criteria1:="*andy*", Operator:=x1Or, _ Criteria2:="*bob*", Operator:=x1Or, _ Criteria3:="*kat*", Operator:=x1Or, _ Criteria4:="*paul*", Operator:=x1Or, _ and so on ..... Being the dunce that I am, it doesn't work - any help or paracetomol would be greatly appreciated. Thanks Andy |
Numerous OR criteria in a Filtered Macro
try using the 'Advanced Filter' under Tools \ Filter rather than the
'Autofilter' option. Rob |
Numerous OR criteria in a Filtered Macro
AFAIK you can't. But you can put in a helper column (hide if desired)
=IF(OR(D1={"add","ddd","joe"}),1,"") and filter on that 1 criteria -- Don Guillett SalesAid Software "Andy Wilkinson" <Andy wrote in message ... Hi All! I am trying to dump records from one worksheet into another, but am trying to look for 8 different OR's in one go, as I would like the data to be pasted as one block. I have used so far: Selection.AutoFilter Selection.AutoFilter Field:=3, Criteria1:="*andy*", Operator:=x1Or, _ Criteria2:="*bob*", Operator:=x1Or, _ Criteria3:="*kat*", Operator:=x1Or, _ Criteria4:="*paul*", Operator:=x1Or, _ and so on ..... Being the dunce that I am, it doesn't work - any help or paracetomol would be greatly appreciated. Thanks Andy |
Numerous OR criteria in a Filtered Macro
Here's a thought. Put this formula in D2
=OR(D2={"bob","andy","paul"}) and copy down, then filter on TRUE Selection.AutoFilter Selection.AutoFilter Field:=4, Criteria1:="TRUE" -- HTH RP (remove nothere from the email address if mailing direct) "Andy Wilkinson" <Andy wrote in message ... Hi All! I am trying to dump records from one worksheet into another, but am trying to look for 8 different OR's in one go, as I would like the data to be pasted as one block. I have used so far: Selection.AutoFilter Selection.AutoFilter Field:=3, Criteria1:="*andy*", Operator:=x1Or, _ Criteria2:="*bob*", Operator:=x1Or, _ Criteria3:="*kat*", Operator:=x1Or, _ Criteria4:="*paul*", Operator:=x1Or, _ and so on ..... Being the dunce that I am, it doesn't work - any help or paracetomol would be greatly appreciated. Thanks Andy |
All times are GMT +1. The time now is 04:25 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com