LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 157
Default Filter and Delete all rows with a date greater than or = today

I am trying to create a macro that will delete all rows with a date greater
than or equal to today. The date is from the prior year, in column B. I
can't use criteria greater than or = to today because the date is from last
year. For instance I need to delete any rows with data equal to or greater
than the 5th deleted. The date will change as the days change. So, tomorrow
I would need filtered and deleted for the 6th and above. Row B is formatted
as D, so only the number of the day is showing. Can someone help me with
this please? This is what I have, but know why it isn't working....because
it's trying to filter for today's date(this year).

Columns("B:B").Select
Selection.AutoFilter
Selection.AutoFilter Field:=1, Criteria1:="=today()", Operator:=xlAnd
 
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
Minimum Date Greater than Today() VickiMc Excel Worksheet Functions 7 April 30th 23 07:42 PM
how do i filter records with greater number across rows Scouvy Excel Worksheet Functions 1 April 21st 09 01:06 PM
how do i filter a list greater than 1000 rows kambara1 Excel Discussion (Misc queries) 1 April 29th 08 09:11 AM
Delete all rows not today SITCFanTN Excel Programming 4 June 11th 06 04:07 PM
countif a date is greater than today Keith Excel Worksheet Functions 3 January 12th 05 03:37 AM


All times are GMT +1. The time now is 06:50 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"