Help deleting a row
Sorry I noticed a goof in my coding...
rngall.delete
should be
rngall.entirerow.delete
Sorry
--
HTH...
Jim Thomlinson
"Jim Thomlinson" wrote:
Make one big range out of all of the found cells and the delete the entire
range all at onece similar to this...
dim rngAll as range
Columns("F:F").Select
With Selection
Set c = .Find("Take Out", LookIn:=xlValues)
If Not c Is Nothing Then
firstAddress = c.Address
set rngAll = c
Do
set rngAll = Union(c, rngAll)
Set c = .FindNext(c)
Loop While c.address < firstAddress
rngall.delete
End If
End With
(untested but it should be close)
--
HTH...
Jim Thomlinson
"MESTRELLA29" wrote:
This macro deletes all rows that on column "F" have the word "Take Out"
It works fine but, it takes to long, and now I need the macro to delete this
and also go to column "G" and delete all that are not "allowance".
I need this fast, the current macro take about 3 to 4 minutes
'Borra los que no sean Customer Validos
Columns("F:F").Select
With Selection
Set c = .Find("Take Out", 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
|