Private Sub Wpen()
Dim v, s, n As Date
v = Application.WorksheetFunction.Max(Range("c2:c3")) 'C2:C3为要审查的单元格
For Each s In Range("C2:C3")
n = Date '获取当前日期
If s > n And s < n + 60 Then ' 设置到期60天时提醒
If v > s Then
v = s
End If
End If
Next
MsgBox "有产品于" & CDate(v) & "到期,请及时修订!"
End Sub
楼主这个有问题问题。就是只能取一个过期时间的