View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 27,285
Default Delet all row's with "TOTALS"


Set c = .Find("TOTALS", LookIn:=xlValues)
If Not c Is Nothing Then
firstAddress = c.Address
Do
set d = c.offset(-1,0)
c.EntireRow.Delete
Set c = .FindNext(d)

Loop While Not c Is Nothing
End If
End With

--
Regards,
Tom Ogilvy


"MESTRELLA29" wrote in message
...
I have a Download that I am trying to clean up.
The download has data that I need but also has totals in severals row's
I want to Find the "TOTALS" and delete the Row for all the rows tha

contains
"TOTALS"

I have is This: I am geting error Message in "Set c = .FindNext(c)"
Columns("d:d").Select

With Selection

Set c = .Find("TOTALS", LookIn:=xlValues)
If Not c Is Nothing Then
firstAddress = c.Address
Do
c.EntireRow.Delete
Set c = .FindNext(c)

Loop While Not c Is Nothing And c.Address < firstAddress
End If
End With