Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
a simple filter does it. just record a macro & examione the code
Sub Macro1() Selection.AutoFilter Selection.AutoFilter Field:=1, Criteria1:="=12-Sep-2005", Operator:= _ xlAnd, Criteria2:="<=16-Sep-2005" End Sub just change this to a sub and call it .. sub test SetDateFilter "12-Sep-2005","16-Sep-2005" end sub Sub SetDateFilter(start as string, stop as string) Selection.AutoFilter Selection.AutoFilter Field:=1, Criteria1:="=" & start, Operator:= _ xlAnd, Criteria2:="<=" & stop End Sub now alter the calling sub to use cell references to give flexibility sub test SetDateFilter format$(range("startdate"),"dd-mm-yy"), _ format$(range("stopdate"),"dd-mm-yy") end sub now name a couple of cells as indicated, and assign the sub to a button... "Bettergains" wrote: Hello: I'm feeling a bit lazy on this one: I have a simple sheet with x rows. I would like to add a button (or sc key) that will sort all rows for "this weeks" entries): "Show all the entries dated between this Monday and Friday." I have one date column for these dates. I'm sure someone's already done this, rather than rtw.... Thanks, germaine |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Excel - Golf - how to display "-2" as "2 Under" or "4"as "+4" or "4 Over" in a calculation cell | Excel Discussion (Misc queries) | |||
Display "this week" column headers w/date & day of week? | Excel Worksheet Functions | |||
Macro to concatenate into "B1" B2 thru B"x" based on new data in "Col A" | Excel Discussion (Misc queries) | |||
"Clean Me" Macro is giving "#VALUE!" error in the Notes field. | Excel Programming | |||
Sending macro based e-mail with built-in "Heading" and "Text" | Excel Programming |