如何在日期范围内过滤多张数据。我找不到解决方法。一个按钮,它需要过滤所有图纸数据。
Sub ApplyFilter()
Dim wsDL As Worksheet
Dim wsABC As Worksheet
Dim rngAD As Range
Dim wsO() As Worksheet
wsO = Array(Google, Bing, Yahoo, Facebook, Amazon)
Set wsABC = wsO
Set wsDL = Sheets("DateList")
Set rngAD = wsABC.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
wsABC.Range("Database").AdvancedFilter _
Action:=xlFilterInPlace, _
CriteriaRange:=wsABC.Range("G1:H2"), Unique:=False
End Sub