Weekend and Long-weekend Date Functions

As of Excel 2007, Microsoft supports different weekend occurrences in the international version of the date functions (e.g. WORKDAY.INTL). The weekend conventions are defined by either a number or a 7-characters long string (code).

Weekend conventions specify which days of the week are weekends. The weekend convention is defined by a weekend number (1-7 and 11-17) or by a weekend string. Weekend string values are seven characters long and each character in the string represents a day of the week, starting with Monday. 1 represents a non-workday and 0 represents a workday. Only the characters 1 and 0 are permitted in the string. 1111111 is an invalid string, for example.

The weekend number (and weekends string) values indicate the following weekend days:

Weekend-Number Weekend Days Weekend Code
1 Saturday, Sunday 0000011
2 Sunday, Monday 1000001
3 Monday, Tuesday 1100000
4 Tuesday, Wednesday 0110000
5 Wednesday, Thursday 0011000
6 Thursday, Friday 0001100
7 Friday, Saturday 0000110
11 Sunday only 0000001
12 Monday only 1000000
13 Tuesday only 0100000
14 Wednesday only 0010000
15 Thursday only 0001000
16 Friday only 0000100
17 Saturday only 0000010

Remarks

  • A weekend is said to be a long-weekend if a holiday falls immediately before or after this weekend. NumXL has support for long and short weekends as of version 1.56 (Zebra).
References

 

Have more questions? Submit a request

0 Comments