A
alexm999
How do I delete 3 rows after the rows that starts off with the wor
"ADDRESS" ?
"ADDRESS" ?
Bob Phillips said:Why didn't you say?
Dim oFound As Range
Dim firstaddress
Set oFound = Cells.Find("ADDRESS")
If Not oFound Is Nothing Then
firstaddress = oFound.Address
Do
oFound.Offset(1, 0).Resize(3, 1).EntireRow.Delete
Set oFound = Cells.FindNext(oFound)
Loop While Not oFound Is Nothing And firstaddress <> oFound.Address
End If
--
HTH
Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)
JMay said:Bob:
Based on your macro I set up a scenario and gave it a try. It work
perfectly, only somehow [at the end] it goes back to the beginning of the
range and deletes two additional rows, erroneously. Can you comment/alter
code to eliminate?
TIA,