Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
Custom Filter w/ formula
How can I use a formula in a custom filter? I have a macro that formats and
sorts a report that I receive each day, but I want it to sort out everything greater than today. I have tried to use the function =NOW(), but with no success. |
#2
Posted to microsoft.public.excel.misc
|
|||
|
|||
Custom Filter w/ formula
Adapt the idea in the following macro to your macro;
Sub Macro1() Dim dt As String 'Build the criteria dt = "" & CStr(Date) Columns("A:C").Select Selection.AutoFilter 'Filter the range A1:C29 on Col C using the criteria built above ActiveSheet.Range("$A$1:$C$29").AutoFilter Field:=3, _ Criteria1:= dt End Sub "LH" wrote: How can I use a formula in a custom filter? I have a macro that formats and sorts a report that I receive each day, but I want it to sort out everything greater than today. I have tried to use the function =NOW(), but with no success. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Custom filter date using VB | Excel Discussion (Misc queries) | |||
Custom Filter? | Excel Discussion (Misc queries) | |||
Custom Filter | Excel Worksheet Functions | |||
Custom Filter | New Users to Excel | |||
Custom Filter | Excel Discussion (Misc queries) |