timzimm02816
New Member
- Joined
- Jan 16, 2023
- Messages
- 6
- Office Version
- 365
- Platform
- Windows
Sub ClearRange()
Application.ScreenUpdating = False
Dim lRow As Long
lRow = Cells.Find("*", SearchOrder:=xlByRows, SearchDirection:=xlPrevious).Row - 5
Range("BI5:BO" & lRow).AutoFilter Field:=1, Criteria1:="<" & Date
Range("BK9:BY" & lRow).SpecialCells(xlCellTypeVisible).ClearContents
Range("BI5").AutoFilter
Application.ScreenUpdating = True
End Sub
Sub ClearRange()
Application.ScreenUpdating = False
Dim lRow As Long
lRow = Cells.Find("*", SearchOrder:=xlByRows, SearchDirection:=xlPrevious).Row - 5
IF
Range("BI5:BO" & lRow).AutoFilter Field:=1, Criteria1:="<" & Date
THEN
Range("BK9:BY" & lRow).SpecialCells(xlCellTypeVisible).ClearContents
Range("BI5").AutoFilter
ELSE
?do nothing?
End IF
Application.ScreenUpdating = True
End Sub
Sub ClearRange()
Application.ScreenUpdating = False
Dim lRow As Long
lRow = Cells.Find("*", SearchOrder:=xlByRows, SearchDirection:=xlPrevious).Row - 5
Range("BI5:BO" & lRow).AutoFilter Field:=1, Criteria1:="<" & Date
If [subtotal(103,BI:BI)] - 1 > 0 Then
Range("BK9:BY" & lRow).SpecialCells(xlCellTypeVisible).ClearContents
End If
Range("BI5").AutoFilter
Application.ScreenUpdating = True
End Sub