筛选两个日期间的全部数据
Dim a, b, c
a = Format(Date, "yyyy/m") '当前年月日
MsgBox a '显示日期时间
'当前月份加4
b = DateAdd("m", 4, a)
Debug.Print b
Dim Rng As Range, arr As Variant
Dim EndRow As Long, EndCol As Long
Dim Rngtime As Range
With Sheets("PM")
'获取A列最后一行(非空行)的行号
EndRow = .Cells(.Cells.Rows.Count, 1).End(xlUp).Row
'获取第一行最后一列(非空列)的列号
EndCol = .Cells(1, .Cells.Columns.Count).End(xlToLeft).Column
'保存数据
Set Rng = .Range(.Cells(1, 1), .Cells(EndRow, EndCol))
'存入数组
arr = Rng.Value
'end time
' Set Rngtime = .Range(.Cells(1, 3), .Cells(EndRow, 3))
End With
' 循环筛选符合条件的数据
'
' 重新