Filter Data By Last Month

Deener

New Member
Joined
Dec 15, 2009
Messages
13
Hello. Me and a co-worker are working on a table for issues in the office outsourced for repair. We'd like to filter data, for a report, by the opened date of last month. The opened date field format is mm/dd/yy and it's column E(5). Its intended for a macro to run at a click of a button. From other marcos we've made for this table, here's an example of what we have so far:

Sub LastMonthReportPreview()
'
' LastMonthReportPreview Macro
'
Application.ScreenUpdating = False
Sheets("Issues Table").Select
Selection.Filter field:=5, Criteria1:=
With ActiveSheet.PageSetup
.LeftHeader = "&18Monthly Issues:&10 Print Date: &""Arial,Bold""&D" & Chr(10) & " "
End With
ActiveWindow.SelectedSheets.PrintPreview
Selection.AutoFilter field:=5
Sheets("Reports").Select
End Sub


The red line is where we're stumped. We don't know how to filter it properly. Could someone lend a hand with this?

Thanks in advance.
 

Excel Facts

Links? Where??
If Excel says you have links but you can't find them, go to Formulas, Name Manager. Look for old links to dead workbooks & delete.

Forum statistics

Threads
1,216,095
Messages
6,128,790
Members
449,468
Latest member
AGreen17

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top