0

I have a huge data sheet which I want to "AutoFilter" by three different criteria which are in three different columns.

Is it possible in Excel VBA to connect three AutoFilters with a logic like:

Criteria 1 AND (Criteria2 AND/OR Criteria3)

For example, I am analiyzing football teams by league, market value, revenue. Therefore, I want to filter my data by following criterias:

Criteria 1: They have to play in the highest league in their country AND (Criteria 2: Market Value most be >= 300 Mio AND/OR Criteria 3: Revenue most be >= 100 Mio )

Thank you :)

HPM
  • 113
  • 1
  • 8
  • Simply reverse [this](https://stackoverflow.com/questions/19497659/excel-vba-autofilter-all-but-three/35120033?s=1|66.1409#35120033) –  Mar 07 '18 at 16:31
  • @Jeeped: What exactly do you mean by "simply reverse"? – HPM Mar 07 '18 at 16:34
  • Given the prompt reply I gather that you didn't bother reading the post behind the link or if you did, you didn't absorb it. –  Mar 07 '18 at 16:37
  • @Jeeped: Sorry my fault. I didn't see the link. I will check it out, thanks :) – HPM Mar 07 '18 at 16:43
  • @Jeeped: Okay I have checked it but I still don't see what you mean by "simply reverse" it? This Problem is for only one column, mine is for three different. Can you please explain it to me? :) – HPM Mar 08 '18 at 14:00

1 Answers1

0

Sort-of. Filtering by AND across columns is easy, but filtering by OR is only possible within a single column... unless you add a "calculation" column and filter on that instead.

To expand: Create a new column, something like "High Revenue or Market Value", and give it a formula which is TRUE when [Market Value]>= 300 millon OR [Revenue] >= 100 millon or FALSE otherwise, then filter on that column for TRUE. (i.e. if "Market Value" is column B, and "Revenues" is column C, then the formula for row 2 would be =OR(B2>=300000000,C2>=100000000)

Chronocidal
  • 6,827
  • 1
  • 12
  • 26