Sir/Mada,
How do I delete an entire row if the date in Cell H2 does not fall between 15 July 2009 and 23 January 2010? I'm using Excel 2007 with VBA and operating on a computer running Win XP Pro.
Sir/Mada,
How do I delete an entire row if the date in Cell H2 does not fall between 15 July 2009 and 23 January 2010? I'm using Excel 2007 with VBA and operating on a computer running Win XP Pro.
Do you mean "if the value in H2 doesn't match the date range, delete the row, repeat this comparison all the way down column H deleting all rows that do not match the date range?"
Also, are you sure you want to delete and not just "hide temporarily"? If you turn on the DATA > FILTER > AUTOFILTER you can then filter column H by any date range.
_________________
Microsoft MVP 2010 - Excel
Visit: Jerry Beaucaire's Excel Files & Macros
If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
Always put your code between code tags. [CODE] your code here [/CODE]
?None of us is as good as all of us? - Ray Kroc
?Actually, I *am* a rocket scientist.? - JB (little ones count!)
Look over here at your other thread:
http://www.excelforum.com/excel-prog...re-row-if.html
I do want to delete and not hide. If using the AutoFilter the most direct with least lines of code, I'm for it. How do I set the range of dates using the Autofilter. Thanks.
I think the best way is presented already in your other post. Use that solution for this problem, too. See post #3 above.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks