I need some help with the macro below, I would like to have it run for sheet 1 only and I would like to be able to run it from wny sheet in the workbook
Thank you
mark
Sub DeleteRows()
Dim iRow As Long
With ActiveSheet
For iRow = .Cells(.Rows.Count, "B").End(xlUp).Row To 5 Step -1
If .Cells(iRow, "B").Value = "Mark" And _
InStr(1, .Cells(iRow, "C").Value, "Grant", vbTextCompare) And _
InStr(1, .Cells(iRow, "E").Value, "Repower", vbTextCompare) Then
.Rows(iRow).Delete
End If
Next iRow
End With
End Sub
Thank you
mark
Sub DeleteRows()
Dim iRow As Long
With ActiveSheet
For iRow = .Cells(.Rows.Count, "B").End(xlUp).Row To 5 Step -1
If .Cells(iRow, "B").Value = "Mark" And _
InStr(1, .Cells(iRow, "C").Value, "Grant", vbTextCompare) And _
InStr(1, .Cells(iRow, "E").Value, "Repower", vbTextCompare) Then
.Rows(iRow).Delete
End If
Next iRow
End With
End Sub