using macros to autofilter using CURRENT date

B

brian97

What is the macro I need for autofiltering using the current date?
I want the macro to update every day and know the date.
 
R

Rick Sanderson

|| What is the macro I need for autofiltering using the current date?
|| I want the macro to update every day and know the date.
||
||
|| ---
||

typing =now() will enter the current date into a cell.

so you could have a cell containing this function and a autofilter
referencing this cell, assuming the dates are stored in col A

Worksheets("sheet1").Range("a1").Select
Selection.AutoFilter Field:=1, Criteria1:=*cell reference here*

Rick
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top