Hello Experts,
I have a requirement where i need to update a column in excel with dates thats equal to todays Date + 2 days ahead (Ex: 4-Aug + 2 Days ahead).
But the date must not be a weekend (Saturday and Sunday) and also none among the below shown holiday list.
Suppose i am running this Macro Today (4th-August), how can determine next working as 10-Aug based on below holiday list + Weekends.?
I can determine weekends using below code but i need check for holiday list too to determine for how many days i need to count ahead.
Can anyone please help with the VBA code to find this..?
Holiday list
[TABLE="width: 0"]
<tbody>[TR]
[TD]7-Aug-17
[/TD]
[/TR]
[TR]
[TD]8-Aug-17
[/TD]
[/TR]
[TR]
[TD]9-Aug-17
[/TD]
[/TR]
[TR]
[TD]24-Nov-17
[/TD]
[/TR]
[TR]
[TD]25-Dec-17
[/TD]
[/TR]
[TR]
[TD]26-Dec-17
[/TD]
[/TR]
[TR]
[TD]27-Dec-17
[/TD]
[/TR]
[TR]
[TD]28-Dec-17
[/TD]
[/TR]
[TR]
[TD]29-Dec-17
[/TD]
[/TR]
</tbody>[/TABLE]
I have a requirement where i need to update a column in excel with dates thats equal to todays Date + 2 days ahead (Ex: 4-Aug + 2 Days ahead).
But the date must not be a weekend (Saturday and Sunday) and also none among the below shown holiday list.
Suppose i am running this Macro Today (4th-August), how can determine next working as 10-Aug based on below holiday list + Weekends.?
I can determine weekends using below code but i need check for holiday list too to determine for how many days i need to count ahead.
Code:
Weekday(MyDate, vbMonday) > 5
Can anyone please help with the VBA code to find this..?
Holiday list
[TABLE="width: 0"]
<tbody>[TR]
[TD]7-Aug-17
[/TD]
[/TR]
[TR]
[TD]8-Aug-17
[/TD]
[/TR]
[TR]
[TD]9-Aug-17
[/TD]
[/TR]
[TR]
[TD]24-Nov-17
[/TD]
[/TR]
[TR]
[TD]25-Dec-17
[/TD]
[/TR]
[TR]
[TD]26-Dec-17
[/TD]
[/TR]
[TR]
[TD]27-Dec-17
[/TD]
[/TR]
[TR]
[TD]28-Dec-17
[/TD]
[/TR]
[TR]
[TD]29-Dec-17
[/TD]
[/TR]
</tbody>[/TABLE]