筛选后删除。
Count系列函数(count、counta、countblank、countif、countifs)用于计数,比如:
=COUNT(A:A)
一个自动筛选可以解决的问题,何必要使用VB呢...除非你在做一个系统
Sub rM()
Dim r, m
r = [b65536].End(xlUp).Row
For m = 2 To r
Cells(m, 2).Select
If Cells(m, 2) = "" Then Exit Sub
If Cells(m, 2).Value < Date Then
Rows(m).Delete
m = m - 1
End If
Next m
End Sub
用VBA,不用VB,是xcel自带的!