title: Autofilter on Mutliple Columns Excel VBA
body: <p>I need to filter a data table where 3 columns can contain the result I am looking for:</p>
  <p>So if the criteria is found in columns 1, 2 or 3 then the row should be returned.</p>
  <p><a href="https://i.stack.imgur.com/JdKo8.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/JdKo8.png" alt="Data" /></a><br />
  <sub>(source: <a href="http://im69.gulfup.com/gBZHK.png" rel="nofollow noreferrer">gulfup.com</a>)</sub></p>
  <p>So in the above sample data lets say I select the criteria as &quot;Fat&quot;</p>
  <p>I am looking for the autofilter to return rows 1 &amp; 2; if I select the criteria as &quot;Funny&quot; I need rows 2 &amp; 6 and so on....</p>
  <p>Below is my code which is not working since apparently it tries to find the rows in which all columns contain the criteria, and it is not what I am looking to do.</p>
  <pre><code>With Sheet1
      .AutoFilterMode = False
  
      With .Range(&quot;A1:D6&quot;)
      .AutoFilter
      .AutoFilter Field:=2, Criteria1:=&quot;Fat&quot;, Operator:=xlFilterValues
      .AutoFilter Field:=3, Criteria1:=&quot;Fat&quot;, Operator:=xlFilterValues
      .AutoFilter Field:=4, Criteria1:=&quot;Fat&quot;, Operator:=xlFilterValues
      End With
  End With
  </code></pre>
  <p>I have also tried to use <code>Operator:=xlor</code> but when I ran the code it returned no results.</p>
  <p>In short: The row must be returned by the filter is the criteria is found in column B or C or D.</p>
  <p>Help is definitely appreciated.</p>