auto.pilot
Well-known Member
- Joined
- Sep 27, 2007
- Messages
- 734
- Office Version
- 365
- Platform
- Windows
The code below clears entire row contents if the word 'Unused' is found in column C. I'd like to restrict this to only the last row for each loop. ie: if 'Unused' is found in cell C13, 'Cars' is in cell C14 and 'Unused' is in C15 & C16, then clear row 15 & 16 but don't clear row 13, or anything 14 or above.
How can I do this?
Thanks
jim
How can I do this?
Thanks
jim
Code:
Sub DeleteUnused()
Last = Range("C55").End(xlUp).Row
For i = Last To 8 Step -1
If (Cells(i, "C").Value) = "Unused" Then
Cells(i, "A").EntireRow.ClearContents
End If
Next i
End Sub