View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
andresg1975 andresg1975 is offline
external usenet poster
 
Posts: 60
Default Macro definition help

Sub DeleteHeadings()
Dim rng As Range
Dim target As String
target = InputBox("Enter Search Term")
If target = "" Then Exit Sub
Do
If Not rng Is Nothing Then
rng.Resize(8, 1).EntireRow.Delete
End If
Set rng = Nothing
Set rng = Cells.Find(What:=target, _
After:=ActiveCell, _
LookIn:=xlFormulas, _
LookAt:=xlPart, _
SearchOrder:=xlByRows, _
SearchDirection:=xlNext, _
MatchCase:=False)
Loop While Not rng Is Nothing
End Sub

Can someone explain me in simple words what is this macro performing step by
step. I would really appreciate that. Thanks.