Hi Experts - i have a problem with my code. I have a conditional formatting rules i set that highlights the cell if it has a value of FALSE or DUPLICATE. It works right after i set the rules however the rules get deleted after running below code. Do the rules get deleted by any of the codes below? Not sure why. Can someone help please? Thank you!
Code:
Sub Clear()
Application.ScreenUpdating = False
Dim Ws As Worksheet
Dim Last_Row As Long
Dim Formula_Row As Long
Dim Last_RowM As Long
Sheets("Check").Select
ActiveSheet.AutoFilterMode = False
''This is solid for Advanced Filter:
On Error Resume Next
ActiveSheet.ShowAllData
Err.Clear
Last_Row = Range("A" & Rows.Count).End(xlUp).Row
If Last_Row > 1 Then Range("A2:H" & Last_Row).Clear
Formula_Row = Range("AAE" & Rows.Count).End(xlUp).Row
If Formula_Row > 2 Then Range("ZZ3:AAH" & Formula_Row).Clear
ActiveSheet.[A1].Select
Sheets("SRPT").Select
ActiveSheet.AutoFilterMode = False
''This is solid for Advanced Filter:
On Error Resume Next
ActiveSheet.ShowAllData
Err.Clear
Last_Row = Range("A" & Rows.Count).End(xlUp).Row
If Last_Row > 1 Then
Range("A2:K" & Last_Row).Clear
Range("M2:S" & Last_Row).Clear
End If
Last_RowM = Range("M" & Rows.Count).End(xlUp).Row
If Last_RowM > 1 Then
Range("A2:K" & Last_RowM).Clear
Range("M2:S" & Last_RowM).Clear
End If
ActiveSheet.[A1].Select
Sheets("MENU").Select
MsgBox "All sheets are cleared, you may now proceed with checks"
Application.ScreenUpdating = True
End Sub