ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Date Macro filter (https://www.excelbanter.com/excel-programming/343261-date-macro-filter.html)

mister z[_4_]

Date Macro filter
 

Hey guys,
Need help with code to do the follolwing:
Project |Project Date |Todays Date
100190 |11-Oct-2005 |10/14/05 08:34 AM
100190 |12-Oct-2005 |10/14/05 08:34 AM
100190 |13-Oct-2005 |10/14/05 08:34 AM
100190 |14-Oct-2005 |10/14/05 08:34 AM
100220 |15-Oct-2005 |10/14/05 08:34 AM
100252 |16-Oct-2005 |10/14/05 08:34 AM
100257 |17-Oct-2005 |10/14/05 08:34 AM
100275 |18-Oct-2005 |10/14/05 08:34 AM
100275 |19-Oct-2005 |10/14/05 08:34 AM

I have 3 columns: Project, Project Date, and todays date.
I would like to filter out all days less than OCT 14th(Today) and + 2
days and spit this to sheet 2. So sheet 2 would show:

Project |Project Date |Todays Date
100190 |11-Oct-2005 |10/14/05 08:34 AM
100190 |12-Oct-2005 |10/14/05 08:34 AM
100190 |13-Oct-2005 |10/14/05 08:34 AM
100190 |14-Oct-2005 |10/14/05 08:34 AM
100220 |15-Oct-2005 |10/14/05 08:34 AM
100252 |16-Oct-2005 |10/14/05 08:34 AM

I tried a few things but nothing was working

Any help is appreciated.
Thx.


--
mister z
------------------------------------------------------------------------
mister z's Profile: http://www.excelforum.com/member.php...o&userid=28099
View this thread: http://www.excelforum.com/showthread...hreadid=477583


Tom Ogilvy

Date Macro filter
 
Put in a dummy column where you subtract the two dates, then autofilter on
that column.

You can get most of the code you need with the macro recorder.

Another approach would be to use the advanced filter with a calculated
criteria

--
Regards,
Tom Ogilvy

"mister z" wrote in
message ...

Hey guys,
Need help with code to do the follolwing:
Project |Project Date |Todays Date
100190 |11-Oct-2005 |10/14/05 08:34 AM
100190 |12-Oct-2005 |10/14/05 08:34 AM
100190 |13-Oct-2005 |10/14/05 08:34 AM
100190 |14-Oct-2005 |10/14/05 08:34 AM
100220 |15-Oct-2005 |10/14/05 08:34 AM
100252 |16-Oct-2005 |10/14/05 08:34 AM
100257 |17-Oct-2005 |10/14/05 08:34 AM
100275 |18-Oct-2005 |10/14/05 08:34 AM
100275 |19-Oct-2005 |10/14/05 08:34 AM

I have 3 columns: Project, Project Date, and todays date.
I would like to filter out all days less than OCT 14th(Today) and + 2
days and spit this to sheet 2. So sheet 2 would show:

Project |Project Date |Todays Date
100190 |11-Oct-2005 |10/14/05 08:34 AM
100190 |12-Oct-2005 |10/14/05 08:34 AM
100190 |13-Oct-2005 |10/14/05 08:34 AM
100190 |14-Oct-2005 |10/14/05 08:34 AM
100220 |15-Oct-2005 |10/14/05 08:34 AM
100252 |16-Oct-2005 |10/14/05 08:34 AM

I tried a few things but nothing was working

Any help is appreciated.
Thx.


--
mister z
------------------------------------------------------------------------
mister z's Profile:

http://www.excelforum.com/member.php...o&userid=28099
View this thread: http://www.excelforum.com/showthread...hreadid=477583





All times are GMT +1. The time now is 12:25 AM.

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