To apply a filter to a date field using Date Filters > Equals..., do one of the following:
Option 1:
Apply the default Short Date format to the entire date field.
![short_date_format.png](https://cdn.statically.io/img/i.sstatic.net/tLnhl8yf.png)
Then filter by the Value
of the criteria cell. For example:
Option Explicit
Sub FilterByDateEqualsValue()
Dim lo As ListObject, rg As Range
Set lo = Sheet1.ListObjects("Table1")
Set rg = Sheet1.Range("A2")
lo.Range.AutoFilter Field:=lo.ListColumns("Date").Index, _
Criteria1:="=" & rg.Value
End Sub
Note: you MUST concatenate the "=" sign to the criteria value with this method...
Criteria1:="=" & rg.Value
will work
Criteria1:=rg.Value
will NOT work
Option 2:
If a custom date format has been applied to the entire date field (i.e. dd/mm/yy), use the Format
function to apply the same format to the criteria value.
Sub FilterByDateEqualsFormat()
Dim lo As ListObject, rg As Range
Set lo = Sheet1.ListObjects("Table1")
Set rg = Sheet1.Range("A2")
lo.Range.AutoFilter Field:=lo.ListColumns("Date").Index, _
Criteria1:="=" & Format(rg.Value, "dd/mm/yy")
End Sub
Option 3:
To eliminate the potential for errors caused by incorrect or inconsistent date formatting within the date field, use the Date Filters > Between... method.
Sub FilterByDateBetween()
Dim lo As ListObject, rg As Range
Set lo = Sheet1.ListObjects("Table1")
Set rg = Sheet1.Range("A2")
lo.Range.AutoFilter Field:=lo.ListColumns("Date").Index, _
Criteria1:=">=" & rg.Value, Operator:=xlAnd, Criteria2:="<=" & rg.Value
End Sub
If you need more assistance, please edit your question to include the code you are currently using.