Free for PREMIUM members
Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium
Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.
Function GetWorkDays(StartDate As Long, EndDate As Long) As Long
' returns the count of days between StartDate - EndDate minus Saturdays and Sundays
Dim d As Long, dCount As Long
For d = StartDate To EndDate
If WeekDay(d, vbMonday) < 6 Then
dCount = dCount + 1
GetWorkDays = dCount
Open in new window
Dim lstRow As Long, Idx As Long
lstRow = Range("G" & Cells.Rows.Count).End(xlUp).Row
For Idx = lstRow To 1 Step -1 ' change 1 to the first row with dates
If Cells(Idx, 7) < Application.WorksheetFunction.WorkDay(Now(), -8) Then
Author Closing Comment
We value your feedback.
Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!
If you are experiencing a similar issue, please ask a related question
Join the community of 500,000 technology professionals and ask your questions.
Join & Ask a Question
Join our community for more solutions or to ask questions.
For immediate help use Live now!