LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10
Default Dydnamic date in an autofilter

I need to do an "and" filter on a date field in Excel 2003.

I have tried this and other variations.

Dim Current_Date, Previous_Date
Current_Date = Date
Previous_Date = Date - 14
'
Selection.AutoFilter Field:=1, Criteria1:="="Previous_Date,
Operator:=xlAnd _
, Criteria2:="=<"Current_Date

Any ideas how to get the dynamic dates to work in the Autofilter?

Thanks!


 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Autofilter a Date range Steen Excel Discussion (Misc queries) 0 November 25th 06 08:23 PM
Why I can't autofilter date (01-Jul-06 to 31-Jul-06) in Exel? elephant Excel Discussion (Misc queries) 1 August 9th 06 02:28 PM
Autofilter with date field gabch[_2_] Excel Programming 1 February 14th 06 11:49 AM
Date flips around when using Autofilter in VB elsandalos Excel Programming 4 February 24th 05 01:53 PM
Custom Date in Autofilter Michael Singmin Excel Programming 3 June 15th 04 11:14 PM


All times are GMT +1. The time now is 10:24 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"