Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
LH LH is offline
external usenet poster
 
Posts: 1
Default 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   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,805
Default 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
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
Custom filter date using VB Kevin Excel Discussion (Misc queries) 1 March 29th 08 07:05 PM
Custom Filter? Steve B Excel Discussion (Misc queries) 2 June 29th 07 09:18 PM
Custom Filter Shams Excel Worksheet Functions 4 July 11th 06 08:36 PM
Custom Filter Rao Ratan Singh New Users to Excel 3 June 16th 06 01:36 PM
Custom Filter Rob Excel Discussion (Misc queries) 18 April 5th 06 03:49 PM


All times are GMT +1. The time now is 04:55 PM.

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"