excel - How to determine if a date falls on the weekend? -
Looking at the date of input, how can I determine that the day falls at one weekend ?
is a week's work that takes a date in the form of an argument and the day (1, 2, 3, etc.) returns
return value:
vbSunday (1) vb Monday (2) vbTuesday (3) vbWednesday (4) vbThursday (5) vbFriday ( 6) vbSaturday (7)
Weekend on Saturdays and Sundays, assume on Saturday and Sunday, the function will look like this:
public function ISWeekend (date format) Input date) Boolean selection Case week day (InputDate) Case VbSaturday, vbSunday IsWeekend = True Case Else IsWeeke Nd = False End Select End Function
Comments
Post a Comment