harleyskater
IT Manager
- Local time
- Today, 15:43
- Joined
- Oct 29, 2007
- Messages
- 95
This is what I have of course Rows(rng.Row + #).Delete is not real code, its just a place holder to show what I need. If anyone knows the code to tell vba to delete the following 4 rows please assist : )
I also have another excel vba question, I will post in another thread. Thank you!
I also have another excel vba question, I will post in another thread. Thank you!
Code:
Dim rng As Range
Dim what As String
what = "Canada"
Do
Set rng = ActiveSheet.UsedRange.Find(what)
If rng Is Nothing Then
Exit Do
Else
Rows(rng.Row).Delete
Rows(rng.Row + 1).Delete
Rows(rng.Row + 2).Delete
Rows(rng.Row + 3).Delete
Rows(rng.Row + 4).Delete
End If
Loop
End Sub