ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Filter Date Code for macro (https://www.excelbanter.com/excel-discussion-misc-queries/159247-filter-date-code-macro.html)

mulehead

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.

Pete_UK

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.




Pete_UK

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 -





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

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com