I am trying to write a VBA code for excel that deletes rows based on the contents of certain cells (all in the same column). My program right now looks like this:
Sub removeCol() Dim i As Integer For i = 10 To 1 Step -1 If Cells(i, 2) = "a" Then Rows(i).Delete End If Next End Sub