Good Evening
Can anybody help?
I am trying to write a quick macro that will see a first word in column A (Selection) which if met will delete that row and next 3 rows beneath it. Then carry on looking down the spreadsheet to repeat if necessary
The code I have tried and failed with is:
Sub DelRow()
rng = Selection.Rows.Count
ActiveCell.Offset(0, 0).Select
Application.ScreenUpdating = False
For i = 1 To rng
If ActiveCell.Value = "Selection" Then
Selection.EntireRow.Delete
Else
ActiveCell.Offset(1, 0).Select
End If
Next i
Application.ScreenUpdating = True
End Sub
I will be grateful for any help
Regards
Jupops.
Can anybody help?
I am trying to write a quick macro that will see a first word in column A (Selection) which if met will delete that row and next 3 rows beneath it. Then carry on looking down the spreadsheet to repeat if necessary
The code I have tried and failed with is:
Sub DelRow()
rng = Selection.Rows.Count
ActiveCell.Offset(0, 0).Select
Application.ScreenUpdating = False
For i = 1 To rng
If ActiveCell.Value = "Selection" Then
Selection.EntireRow.Delete
Else
ActiveCell.Offset(1, 0).Select
End If
Next i
Application.ScreenUpdating = True
End Sub
I will be grateful for any help
Regards
Jupops.