ItalianPlatinum
Well-known Member
- Joined
- Mar 23, 2017
- Messages
- 793
- Office Version
- 365
- 2019
- Platform
- Windows
Hello,
I have a workbook that runs an extract pull from a system. I have the date to run it as the following formula (=WORKDAY(TODAY(),1,'[HOLIDAYS'!A:A)-1). which works great [got it from another forum here ]. The date will default to current day, on Friday's the day before Monday (Sunday's date) or a Monday if Monday is a holiday and if midweek has a holiday will show the holiday's date.
My dilemma is i am looking for a VBA code sort of similar where on a Friday. The date will re-loop and re-execute for each day as outlined above:
Example:
Mon - thurs (no holidays) run for 1 single day
Fridays (no holidays) - run for Friday, then Saturday then Sunday. STOP
Fridays (with Monday holiday) - run for Friday, then Saturday then Sunday then Monday. STOP
Mid-week holiday when next day is a holiday - run for same day and for next day (holiday). STOP
Any help is really appreciated at the moment I have to run it 3 times. so triple the clicks
I have a workbook that runs an extract pull from a system. I have the date to run it as the following formula (=WORKDAY(TODAY(),1,'[HOLIDAYS'!A:A)-1). which works great [got it from another forum here ]. The date will default to current day, on Friday's the day before Monday (Sunday's date) or a Monday if Monday is a holiday and if midweek has a holiday will show the holiday's date.
My dilemma is i am looking for a VBA code sort of similar where on a Friday. The date will re-loop and re-execute for each day as outlined above:
Example:
Mon - thurs (no holidays) run for 1 single day
Fridays (no holidays) - run for Friday, then Saturday then Sunday. STOP
Fridays (with Monday holiday) - run for Friday, then Saturday then Sunday then Monday. STOP
Mid-week holiday when next day is a holiday - run for same day and for next day (holiday). STOP
Any help is really appreciated at the moment I have to run it 3 times. so triple the clicks