title: Filter a table in VBA using a cell as criteria
body: <p>I know that the solution for this might be very easy, but i'm a little lost.</p>
  
  <p>I just need to make a statement that if Item to search (which is a cell), is equal to a text, either Cust_ID or ASIN, to filter a table called table (Table1) in field 5, for the cell in range F5, this is what i have and i don't know what's wrong.</p>
  
  <p>This is what I have:</p>
  
  <pre><code>Sub Search_in_table()
  
  Sheets("ADD INFO").Select
  
  If Item_to_search = "Cust_ID" Then 
      Sheets("INFO").Select
      ActiveSheet.Range(Table1).AutoFilter Field:=5, Criteria1:=Range(F5), Operator:=xlFilterValues
  
  End If
  
  End Sub
  </code></pre>
  
  <p>Any ideas would be appreciated.</p>