Hi
I recorded a macro of running an autofilter and then selecting all the visible rows and deleting. Here is the code it returned:
It initially put a range in the code, but I have now resolved that issue of the variable number of rows in the daily file downloaded from a website, but I need the selection phase to select all visible rows except the header row and then delete. The rows will, of course, be non-contiguous, so that will be the issue
cheers
I recorded a macro of running an autofilter and then selecting all the visible rows and deleting. Here is the code it returned:
VBA Code:
Selection.AutoFilter
ActiveSheet.Range("$A$1").CurrentRegion.AutoFilter Field:=21, Criteria1:="500"
ActiveSheet.Range("$A$1").CurrentRegion.AutoFilter Field:=21, Criteria1:="=500" _
, Operator:=xlOr, Criteria2:="="
Rows("51:51").Select
Range(Selection, Selection.End(xlDown)).Select
Selection.Delete Shift:=xlUp
It initially put a range in the code, but I have now resolved that issue of the variable number of rows in the daily file downloaded from a website, but I need the selection phase to select all visible rows except the header row and then delete. The rows will, of course, be non-contiguous, so that will be the issue
cheers