Hi, I get a data dump from the corporate server. I have manually filtered and deleted the rows I don't need. I decided to record a macro but the output is not quite right because it specifies rows to be selected and those rows might change from day to day as the data shrinks or expands. Is there a way to tell it to simply select the visible rows (except the header) to delete? Today google wasn't real helpful so any ideas or pointers would be great.
VBA Code:
Sub PrepGridData()
'
' PrepGridData Macro
'
'
Range("G7").Select
ActiveSheet.Range("$A$1:$M$2234").AutoFilter Field:=7, Criteria1:= _
"DELETE THIS ROW"
Rows("7:7").Select
Range(Selection, Selection.End(xlDown)).Select
Selection.Delete Shift:=xlUp
ActiveSheet.Range("$A$1:$M$2101").AutoFilter Field:=7
ActiveSheet.Range("$A$1:$M$2101").AutoFilter Field:=4, Criteria1:="<1", _
Operator:=xlAnd
Rows("3:3").Select
Range(Selection, Selection.End(xlDown)).Select
Selection.Delete Shift:=xlUp
ActiveSheet.Range("$A$1:$M$90").AutoFilter Field:=4
Range("F3").Select
ActiveSheet.Range("$A$1:$M$90").AutoFilter Field:=6, Criteria1:="0"
Rows("3:3").Select
Range(Selection, Selection.End(xlDown)).Select
Selection.Delete Shift:=xlUp
ActiveSheet.Range("$A$1:$M$26").AutoFilter Field:=6
Range("A1").Select
End Sub