I have the following code, but it is not working correctly. The code is only selecting a cell in column A, not column A through AD. If I take out .cells(index+1,1) and just use Range("a:ad").select, it works properly, but then I can't index through the data. Any ideas?
Private Sub Keep_IMM()
Index = 1
Do While Range("f2").Cells(Index, 1) <> ""
If Range("f2").Cells(Index, 1) <> "IMM" Then
Range("a:ad").Cells(Index + 1, 1).Select
Selection.Delete
Index = Index - 1
End If
Index = Index + 1
Loop
End Sub
Bookmarks