oliverralph7
07-29-2008, 12:57 PM
I am trying to write some code and I am lost.
Column Z-has a Date entered
I need the macro to check If Column Z has a date within the last two days it will delete the row.
The problem that I am having is that I have to count Saturday and Sunday as 1 day.
If Current Date=Monday it will count Saturday and Sunday as Day 1 and then Friday as Day 2
If Current Date=Tuesday it will count Monday as Day 1 and then Saturday and Sunday as Day 2
If Current Date=Wednesday it will count Tuesday as Day 1 and then Monday as Day 2
If Current Date=Thursday it will count Wednesday as Day 1 and then Tuesday as Day 2
If Current Date=Friday it will count Thursday as Day 1 and then Wednesday as Day 2
I am not sure how to get the macro to work when there is a Saturday and Sunday.
There are 3000 rows on the spreadsheet and the macro would need to go check all the rows.
Column Z-has a Date entered
I need the macro to check If Column Z has a date within the last two days it will delete the row.
The problem that I am having is that I have to count Saturday and Sunday as 1 day.
If Current Date=Monday it will count Saturday and Sunday as Day 1 and then Friday as Day 2
If Current Date=Tuesday it will count Monday as Day 1 and then Saturday and Sunday as Day 2
If Current Date=Wednesday it will count Tuesday as Day 1 and then Monday as Day 2
If Current Date=Thursday it will count Wednesday as Day 1 and then Tuesday as Day 2
If Current Date=Friday it will count Thursday as Day 1 and then Wednesday as Day 2
I am not sure how to get the macro to work when there is a Saturday and Sunday.
There are 3000 rows on the spreadsheet and the macro would need to go check all the rows.