Excel Macro to delete rows

H

Harsh

Hello,

I have an excel Sheet in which I have a blank row below the cell which
contains "<<<Mem>>>".
I vave some random data and multiple such cells. Can I get some help
with the excel macros for the same?

Harsh
 
B

Bob Umlas

Assuming "Mem" is in column E:
Sub DeleteRowBelowMem()
For i=cells(rows.count,5).end(xlup).row to 1 step -1
if cells(i,5).value="Mem" then rows(i+1).Delete
Next
End Sub

Bob Umlas
Excel MVP
HTH
 
Top