excel vba if sunday or staurday excel vba How to determine if a date falls on the weekend?

The solution for “excel vba if sunday or staurday excel vba How to determine if a date falls on the weekend?” can be found here. The following code will assist you in solving the problem.

MsgBox Weekday(my_date, vbMonday) > 5
‘ Or ——————————————————-
Public Function IsWeekend(InputDate As Date) As Boolean
Select Case Weekday(InputDate)
Case vbSaturday, vbSunday
IsWeekend = True
Case Else
IsWeekend = False
End Select
End FunctionMsgBox Weekday(MyDate, vbMonday) > 5

Thank you for using DeclareCode; We hope you were able to resolve the issue.

More questions on [categories-list]

Similar Posts