PC Review


Reply
Thread Tools Rate Thread

Custom Filter w/ formula

 
 
LH
Guest
Posts: n/a
 
      19th Nov 2008
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 With Quote
 
 
 
 
Sheeloo
Guest
Posts: n/a
 
      19th Nov 2008
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 With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Auto filter custom filter stevefromnaki Microsoft Excel Worksheet Functions 2 30th Dec 2009 06:23 AM
Custom filters that filter formula results? cherman Microsoft Excel Programming 1 30th Nov 2009 07:53 PM
Filter, Cell Reference formula and copy formula on filter data umpire_43 Microsoft Excel Programming 0 9th Jul 2009 03:38 PM
custom field with custom formula in pivot table! Sedaghat Nejad Microsoft Excel Worksheet Functions 2 21st Jun 2009 11:19 AM
Commenting custom formula fields/formula on formula editor Muxer Microsoft Excel Programming 2 24th Jul 2003 01:02 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 09:16 PM.