How to delete 19 row after the cell which has certain value

Closed
sherifibrahim
Posts
1
Registration date
Thursday January 9, 2014
Status
Member
Last seen
January 9, 2014
- Jan 9, 2014 at 10:49 AM
venkat1926
Posts
1864
Registration date
Sunday June 14, 2009
Status
Contributor
Last seen
August 7, 2021
- Jan 10, 2014 at 01:02 AM
i have done a code to delete the row which has "Trip" in any cell in this row as below

Sub DeleteRows()
Dim c As Range
Dim SrchRng

Set SrchRng = ActiveSheet.Range("A1", ActiveSheet.Range("A65536").End(xlUp))
Do
Set c = SrchRng.Find("/ Trip", LookIn:=xlValues)
If Not c Is Nothing Then c.EntireRow.Delete

Loop While Not c Is Nothing
End Sub


but aslo i need to delete 19 rows after the deleted row
please help

1 reply

venkat1926
Posts
1864
Registration date
Sunday June 14, 2009
Status
Contributor
Last seen
August 7, 2021
805
Jan 10, 2014 at 01:02 AM
your srchrng row is the last availale row.
then where is the question of deleting 19 rows below as the are all blank.

reprase your question or redefilne srschrng
0