View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
aneurin aneurin is offline
external usenet poster
 
Posts: 7
Default can someone explain what the below macro does

hi i found the below code that seaches col b for any cell that
contains the word verifiers and deletes the enrire row if found
but can someone explain how it does it
i understand most of it but i cant get my head round thr step -1 part

cheers


Sub del_row()
Dim rw As Integer
Dim Word As String
Word = "Verifiers"

For rw = 2000 To 2 Step -1
If InStr(2, ActiveSheet.Cells(rw, 2).Value, Word, vbTextCompare)
Then Cells(rw, 2).EntireRow.Delete
Next rw
End Sub