Thread
:
Advanced filter on last months results
View Single Post
#
3
Posted to microsoft.public.excel.programming
[email protected]
external usenet poster
Posts: 21
Advanced filter on last months results
On Friday, 27 December 2013 17:50:58 UTC, Claus Busch wrote:
Hi Eddie,
Am Fri, 27 Dec 2013 09:42:02 -0800 (PST) schrieb
:
Is it possible with VBA to filter last months data. The date column of my data is Column D. So basically if I run a Macro in December 2013 I only want to end up with November 2103 results, jan 2014 would give me Dec 2013 etc.
try:
With ActiveSheet.Range("D:D")
.AutoFilter Field:=1, Criteria1:= _
xlFilterLastMonth, Operator:=xlFilterDynamic
End With
Regards
Claus B.
--
Win XP PRof SP2 / Vista Ultimate SP2
Office 2003 SP2 /2007 Ultimate SP2
Hi Claus
Thanks for you suggestion I am using Excel 2003 and It look like xlFilterLastMonth will not work with this version?
Thanks anyway
Eddie
Reply With Quote
[email protected]
View Public Profile
Find all posts by
[email protected]