I have a worksheet that I update every week with aging tasks. I pull data from another worksheet to determine which tasks are within my team and the others I delete. I have columns on either side of the fields that I would like to keep as there are formulas that produce results based on the data on the inside columns. I have a script that will delete the entire row if the task is not associated with my team, but I would prefer to just delete a partial row say from column "B" to column "I". Below is my code, how can I alter it to perform the way I want?
Sub test()
Dim LR As Long, i As Long
With Sheets("Data (QM12)")
LR = .Range("C" & Rows.Count).End(xlUp).Row
For i = LR To 1 Step -1
If IsError(Application.Match(.Range("C" & i).Value, Sheets("Conditions (QM16)").Columns("A"), 0)) Then .Rows(i).Delete
Next i
End With
End Sub
Thank you in advance for any assistance
Bookmarks