Hi.
I need to filter and clean the criterion based on another column cells.
If the R column has the value 1, then it is filtered and cleaned only the cells of column J
my spreadsheet needs to stay current with the strange layout
![]()
Sub ClearBasedOtheColumn() Dim r As Excel.Range [J2].Value = "T1" [R2].Value = "T2" With Worksheets("Shee1").Range("J2:R2") .AutoFilter .AutoFilter Field:=9, Criteria1:=1 Set r = .Range("J3", .Range("J3").End(xlDown)) End With r.Clear 'I try line below too 'Cells.SpecialCells(xlCellTypeVisible).Clear ActiveSheet.AutoFilterMode = False End Sub
Bookmarks