Hi, I have a macro that I must change about 10 dates in as it autofilters by date in certain columns like this..
Selection.AutoFilter Field:=7, Criteria1:=">10/15/2010", Operator:=xlAnd, _
Criteria2:="<10/22/2010"
Is there a way to make criteria 1 use todays date, and criteria 2 use todays date + 7 days ?
do i need to use a variable for the system date ?
Last edited by vsantoro; 10-26-2010 at 09:41 AM.
Not tested:
Like this:Microsoft Office Help - Excel VBA ProgrammingSelection.AutoFilter Field:=7, Criteria1:=> Date, Operator:=xlAnd, _ Criteria2:=< Date +7
Not all forums are the same - seek and you shall find
Thanks, Excel knows +7 means plus 7 days ? not 7 years, or 7 months ?
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks