Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default Want to auto filter with date on daily basis

Hi all,

Below is the coding through wich i want to extract some data with putting
filter on date i have recorded a macro for that that describes below in which
i want to set a criteria that pick the data from the current date where i
don't need to change the date going into vb editor it should be changed
automatically on daily basis.

Sub SRT()
'
' SRT Macro
' Macro recorded 6/25/2008 by a_mahto
'
' Keyboard Shortcut: Ctrl+Shift+T
'

ChDir "N:\Miscellaneous\Corporate"
Workbooks.Open Filename:= _
"N:\Miscellaneous\Corporate\Time Tracker Product Team v8.xls",
Password:="Product", UpdateLinks:=3
Selection.AutoFilter Field:=13, Criteria1:="21-June-08"
ActiveWindow.SmallScroll Down:=-3
Range("A1851:B1851").Select
Range(Selection, Selection.End(xlDown)).Select
Range("A1851:B1940,F1851:G1940,J1851:M1940").Selec t
Range("J1851").Activate
Selection.Copy
Windows("SRT Delivery Status.xls").Activate
ActiveSheet.Paste
Rows("385:391").Select
Application.CutCopyMode = False
Selection.Sort Key1:=Range("A385"), Order1:=xlAscending, Header:=xlGuess _
, OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom, _
DataOption1:=xlSortNormal
Range("A385").Select
Selection.End(xlDown).Select
ActiveWorkbook.Save
End Sub
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,420
Default Want to auto filter with date on daily basis

Selection.AutoFilter Field:=13, Criteria1:=Format(Date,"dd-mmmm-yy")


--
__________________________________
HTH

Bob

"Arvind Mahto" wrote in message
...
Hi all,

Below is the coding through wich i want to extract some data with putting
filter on date i have recorded a macro for that that describes below in
which
i want to set a criteria that pick the data from the current date where i
don't need to change the date going into vb editor it should be changed
automatically on daily basis.

Sub SRT()
'
' SRT Macro
' Macro recorded 6/25/2008 by a_mahto
'
' Keyboard Shortcut: Ctrl+Shift+T
'

ChDir "N:\Miscellaneous\Corporate"
Workbooks.Open Filename:= _
"N:\Miscellaneous\Corporate\Time Tracker Product Team v8.xls",
Password:="Product", UpdateLinks:=3
Selection.AutoFilter Field:=13, Criteria1:="21-June-08"
ActiveWindow.SmallScroll Down:=-3
Range("A1851:B1851").Select
Range(Selection, Selection.End(xlDown)).Select
Range("A1851:B1940,F1851:G1940,J1851:M1940").Selec t
Range("J1851").Activate
Selection.Copy
Windows("SRT Delivery Status.xls").Activate
ActiveSheet.Paste
Rows("385:391").Select
Application.CutCopyMode = False
Selection.Sort Key1:=Range("A385"), Order1:=xlAscending,
Header:=xlGuess _
, OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom, _
DataOption1:=xlSortNormal
Range("A385").Select
Selection.End(xlDown).Select
ActiveWorkbook.Save
End Sub



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default Want to auto filter with date on daily basis

A Great thanks it worked.

"Bob Phillips" wrote:

Selection.AutoFilter Field:=13, Criteria1:=Format(Date,"dd-mmmm-yy")


--
__________________________________
HTH

Bob

"Arvind Mahto" wrote in message
...
Hi all,

Below is the coding through wich i want to extract some data with putting
filter on date i have recorded a macro for that that describes below in
which
i want to set a criteria that pick the data from the current date where i
don't need to change the date going into vb editor it should be changed
automatically on daily basis.

Sub SRT()
'
' SRT Macro
' Macro recorded 6/25/2008 by a_mahto
'
' Keyboard Shortcut: Ctrl+Shift+T
'

ChDir "N:\Miscellaneous\Corporate"
Workbooks.Open Filename:= _
"N:\Miscellaneous\Corporate\Time Tracker Product Team v8.xls",
Password:="Product", UpdateLinks:=3
Selection.AutoFilter Field:=13, Criteria1:="21-June-08"
ActiveWindow.SmallScroll Down:=-3
Range("A1851:B1851").Select
Range(Selection, Selection.End(xlDown)).Select
Range("A1851:B1940,F1851:G1940,J1851:M1940").Selec t
Range("J1851").Activate
Selection.Copy
Windows("SRT Delivery Status.xls").Activate
ActiveSheet.Paste
Rows("385:391").Select
Application.CutCopyMode = False
Selection.Sort Key1:=Range("A385"), Order1:=xlAscending,
Header:=xlGuess _
, OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom, _
DataOption1:=xlSortNormal
Range("A385").Select
Selection.End(xlDown).Select
ActiveWorkbook.Save
End Sub




Reply
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
calculating % of a monthly budget on a daily basis DZ Excel Worksheet Functions 3 March 16th 10 05:26 PM
Auto Create an Excel Backup File on a Daily Basis igbert Excel Discussion (Misc queries) 1 October 2nd 09 09:16 PM
i need a formula that calculates current age on a daily basis? Marge Excel Discussion (Misc queries) 2 April 7th 09 09:59 AM
How do I automatically reset numbers to 0 on a daily basis? [email protected].(donotspam) Excel Discussion (Misc queries) 3 December 10th 08 05:17 PM
How do I set up report linking data that changes on daily basis? SrMarsia Excel Programming 0 August 2nd 05 03:37 AM


All times are GMT +1. The time now is 01:26 AM.

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

About Us

"It's about Microsoft Excel"