
Use the WEEKDAY function to determine
the weekend
How do you find out whether or not a date falls on a weekend? To
answer this question you can either use the previous tip or use the
more convenient WEEKDAY function. This function returns the
day of the week as a number corresponding to a date. The returned
number is given as an integer, ranging from 1 (Sunday) to 7 (Satur-
day), by default.
4
To determine the weekend:
1. Using the worksheet from the previous example, select
cells C2:C10 and type the following formula:
=IF(OR(WEEKDAY(A2)=7,WEEKDAY
(A2)=1),"weekend","").
2. Press <Ctrl+Enter>.
Note: In column B use the custom format dddd to check the
result ...