Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
calculating % of a monthly budget on a daily basis | Excel Worksheet Functions | |||
Auto Create an Excel Backup File on a Daily Basis | Excel Discussion (Misc queries) | |||
i need a formula that calculates current age on a daily basis? | Excel Discussion (Misc queries) | |||
How do I automatically reset numbers to 0 on a daily basis? | Excel Discussion (Misc queries) | |||
How do I set up report linking data that changes on daily basis? | Excel Programming |