Basic Row Delete Marco
On Tuesday, July 10, 2012 5:45:23 AM UTC-5, SalientAnimal wrote:
Hi Guys/Gals,
I'm looking for a very basic marco that will delete an entire row if the
cell in column U contains any text/value.
Thanks
--
SalientAnimal
filtering faster than loop
Sub DeleteNonBlanksinColumnSAS()
'column U is colummn 21
'Assumes columns a:u have date on header row
Application.ScreenUpdating = False
With ActiveSheet.UsedRange ' or Range("a2:u20000")
.AutoFilter Field:=21, Criteria1:="<"
.Offset(1).EntireRow.Delete
.AutoFilter
End With
Application.ScreenUpdating = True
End Sub
|