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

[Closed]
Report
Posts
1
Registration date
Thursday January 9, 2014
Status
Member
Last seen
January 9, 2014
-
Posts
1864
Registration date
Sunday June 14, 2009
Status
Contributor
Last seen
August 7, 2021
-
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

Posts
1864
Registration date
Sunday June 14, 2009
Status
Contributor
Last seen
August 7, 2021
802
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