find a cell, jump to next roll and clear all cells

J

jigsaw2

Hello,

Does anyone know how to write a macro to find a specific text, then say
go to next row and clear everything below.

Thanks
Lai
 
T

Trevor Shuttleworth

Lai

without a bit more detailed information, the simple answer is yes, I'm sure
lots of people know how to write a macro to do this. Try something similar
to the following:

Sub DeleteRowsBelowXXX()
Dim SearchRow As String
SearchRow = Cells.Find(What:="xxx", _
After:=ActiveCell, _
LookIn:=xlFormulas, _
LookAt:=xlPart, _
SearchOrder:=xlByRows, _
SearchDirection:=xlNext, _
MatchCase:=False).Row
Range("A" & SearchRow + 1 & ":A65536").EntireRow.Delete
End Sub

Regards

Trevor
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top