Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 18
Default Filter Date Code for macro

I am trying to filter on the last three days of a running report (dates
always changing in a twenty day period) in a macro. Because it is a macro, I
cannot reference a certain date (Dates change but the macro won't). How can
I write this, any help would be appreciated.
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 8,856
Default Filter Date Code for macro

Could you find the maximum (latest) date from the range and then
subtract 3 days from this? Allocate the result to a variable and use
this as the filter value (Custom, greater than or equal to) etc.

Hope this helps.

Pete

On Sep 21, 8:20 pm, mulehead
wrote:
I am trying to filter on the last three days of a running report (dates
always changing in a twenty day period) in a macro. Because it is a macro, I
cannot reference a certain date (Dates change but the macro won't). How can
I write this, any help would be appreciated.



  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 8,856
Default Filter Date Code for macro

I've just noticed that Fred Smith has given you a similar reply
earlier in your other thread - why start a new thread?

Pete

On Sep 22, 1:04 am, Pete_UK wrote:
Could you find the maximum (latest) date from the range and then
subtract 3 days from this? Allocate the result to a variable and use
this as the filter value (Custom, greater than or equal to) etc.

Hope this helps.

Pete

On Sep 21, 8:20 pm, mulehead
wrote:



I am trying to filter on the last three days of a running report (dates
always changing in a twenty day period) in a macro. Because it is a macro, I
cannot reference a certain date (Dates change but the macro won't). How can
I write this, any help would be appreciated.- Hide quoted text -


- Show quoted text -



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
Filter date in macro Dolphinv4 Excel Discussion (Misc queries) 1 August 24th 07 02:19 AM
Code to replace Advanced Filter RobN[_2_] Excel Discussion (Misc queries) 4 June 14th 07 12:31 PM
I require code to run a macro dependant on the date Marie Bayes Excel Discussion (Misc queries) 7 January 15th 07 03:48 PM
Filter isn't working with a VBA Code [email protected] Excel Worksheet Functions 8 June 15th 06 01:20 PM
Color Code Filter indicators - Change from Blue to Red Martinson44 Excel Worksheet Functions 0 November 10th 04 04:25 AM


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

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"