LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #5   Report Post  
Posted to microsoft.public.excel.misc
mudraker
 
Posts: n/a
Default Excel Macro save as date of last friday


Kurt

Try this for the filter

Sub FilterData()
Dim sDates(1 To 2) As String
Dim ddates(1 To 2) As Date
Dim iWeekDay(1 To 2) As Integer

ddates(2) = Now() - Weekday(Now())
ddates(1) = ddates(2) - 8
sDates(1) = Format(ddates(1), "mm/dd/yy")
sDates(2) = Format(ddates(2), "mm/dd/yy")
Rows("1:1").AutoFilter Field:=1, Criteria1:="" & sDates(1), _
Operator:=xlAnd, Criteria2:="<" & sDates(2)
End Sub


--
mudraker
------------------------------------------------------------------------
mudraker's Profile: http://www.excelforum.com/member.php...fo&userid=2473
View this thread: http://www.excelforum.com/showthread...hreadid=542867



 
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
TRYING TO SET UP EXCEL SPREADSHEET ON MY COMPUTER MEGTOM New Users to Excel 5 October 27th 05 03:06 AM
Creating a macro to save only partial data Jparsons Excel Discussion (Misc queries) 0 September 24th 05 10:50 AM
Excel XP: File name in Title Bar not changed after Save As... Dominic Excel Discussion (Misc queries) 9 August 1st 05 12:58 PM
Imported Date & Time format with calcs. managed in excel from imrp Todd F. Excel Worksheet Functions 0 July 8th 05 09:03 PM
Save & Save As features in file menu of Excel Blue Excel Discussion (Misc queries) 9 December 27th 04 08:49 PM


All times are GMT +1. The time now is 07:40 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"