I'm trying to filter between dates on the WB attached and the code below and I'm stuck. I think my ranges are off either in the subs or in the Name Manager or both. I know the code only deals with one date and not two. Not sure how to modify it to two dates.
Sub ApplyFilter()Dim wsDL As Worksheet
Dim wsO As Worksheet
Dim rngAD As Range
Set wsDL = Sheets("DateList")
Set wsO = Sheets("Time")
Set rngAD = wsO.Range("AllDates")
'update the list of dates
wsDL.Range("A1").CurrentRegion.ClearContents
'rngAD.Offset(-1, 0).Resize(rngAD.Rows.Count + 1).Select
rngAD.AdvancedFilter _
Action:=xlFilterCopy, CriteriaRange:="", _
CopyToRange:=wsDL.Range("A1"), Unique:=True
wsDL.Range("A1").CurrentRegion.Sort _
Key1:=wsDL.Range("A2"), Order1:=xlAscending, Header:=xlYes
'filter the list
wsO.Range("Database").AdvancedFilter _
Action:=xlFilterInPlace, _
CriteriaRange:=wsO.Range("A3:B3"), Unique:=False
End Sub
Sub RemoveFilter()
On Error Resume Next
ActiveSheet.ShowAllData
End Sub