title: VBA Autofilter between todays date and todays date - 1 year
body: <p>I am trying to filter between todays date and todays date minus 1 year.  When I run the below VBA nothing happens and the filter doesn't set. Can anyone point me in the correct direction and have searched forums high and low.</p>
  
  <pre><code>Sub Date_Filter()
  
      Keyboard Shortcut: Ctrl+Shift+Q
  
      Dim StartDate As Date
      Dim EndDate As Date
      StartDate = Date
      EndDate = Date - 365
      Sheets("Advisor Data").Select
       ActiveSheet.Range("$A$1:$AL$10000").AutoFilter Field:=4, Criteria1:="&gt;=" &amp; CDbl(EndDate), Operator:=xlAnd, Criteria2:="&lt;=" &amp; CDbl(StartDate)
  
  End Sub
  </code></pre>