title: Date range filter VBA
body: <p>How do I make the below filter work? The reports are generated weekly and the user needs to enter just the beginning and end date. The filter must be applied based on he values the user gives.</p>
  
  <p>I recorded a macro and got the code as </p>
  
  <pre><code>ActiveSheet.Range("$A$1:$C$29663").AutoFilter Field:=1, Criteria1:= _
      "&gt;=5/14/2018", Operator:=xlAnd, Criteria2:="&lt;=5/18/2018"
  </code></pre>
  
  <p>I want to reference cells in the above sentence instead of values:</p>
  
  <p>Something like below: </p>
  
  <pre><code>ActiveSheet.Range("$A$1:$C$29663").AutoFilter Field:=1, Criteria1:= _
      Worksheets("Sheet1").Range("B3").Value, Operator:=xlAnd, Criteria2:=Worksheets("Sheet1").Range("B4").Value
  </code></pre>
  
  <p>The above statement is throws errors. </p>
  
  <p>The date values are 5/14/2018 and 5/19/2018</p>
  
  <p>Sample values in the field</p>
  
  <pre><code>5/1/2018
  5/1/2018
  5/1/2018
  5/1/2018
  5/1/2018
  5/1/2018
  </code></pre>
  
  <p>(formatted as short date)</p>