B
Beth
I'm recording a macro to delete blank rows. I turn on the
AutoFilter, filter on equals "", go down one row to begin
selection, then Shift+End+Down to select everything. Then
delete rows. It works now, but will it when the first row
in the results of the autofilter is not row 560? How can I
fix this code to replace ("D560") with a variable?
Columns("D
").Select
Selection.AutoFilter
Selection.AutoFilter Field:=1, Criteria1:="=""""",
Operator:=xlAnd
Range("D560").Select
Range(Selection, Selection.End(xlDown)).Select
Selection.EntireRow.Delete
Selection.AutoFilter
Range("E1").Select
End Sub
AutoFilter, filter on equals "", go down one row to begin
selection, then Shift+End+Down to select everything. Then
delete rows. It works now, but will it when the first row
in the results of the autofilter is not row 560? How can I
fix this code to replace ("D560") with a variable?
Columns("D
![Big Grin :D :D](/styles/default/custom/smilies/grin.gif)
Selection.AutoFilter
Selection.AutoFilter Field:=1, Criteria1:="=""""",
Operator:=xlAnd
Range("D560").Select
Range(Selection, Selection.End(xlDown)).Select
Selection.EntireRow.Delete
Selection.AutoFilter
Range("E1").Select
End Sub