I am looking to modify the below macro to apply a date filter across multiple worksheets. I would like to tweak the macro to possibly omit blank cells when the filter is applied. When applying the filter manually within the worksheet, there is a check box that is checked by default to include blanks. The same occurs by default when I run the below. The problem is that when I go to print the worksheet, the blank rows are also printed. If the blanks could be ignored by way of the macro filter, the print area would take care of itself. Thank you in advance for your help.
Sub Filter()
Dim ws As Object
For Each ws In Worksheets
ws.Range("$A$1:$G$1000").AutoFilter Field:=1, Criteria1:=Array( _
"Date", "Postage Log", "="), Operator:=xlFilterValues, Criteria2:=Array(1, _
"8/31/2014")
Next ws
End Sub
Bookmarks