What does the "-{1,7}" do in conjunction with SUM
It's subtracting 1 and 7 in order to count the number of Sundays (weekday 1)
and Saturdays (weekday 7) in the month.
That formula can be replaced with:
=NETWORKDAYS(C3,DATE(YEAR(C3),MONTH(C3)+1,0))
With C3 = 1/1/2007
The result is 23 with both formulas.
Biff
"David" wrote in message
...
Gidday
I am seeking a bit of help with what the "-{1,7}" does/means in the
following formula;
=ABS(IF((DATE(YEAR(C3),MONTH(C3)+1,DAY(C3))),(C3)-(DATE(YEAR(C3),MONTH(C3)+1,DAY(C3)))-SUM(INT((WEEKDAY((DATE(YEAR(C3),MONTH(C3)+1,DAY(C3 )))-{1,7})+(C3)-(DATE(YEAR(C3),MONTH(C3)+1,DAY(C3))))/7)),""))
The forumal works out the number of workdays in a month where C3= 1/1/2007
and the return answer is 20
I look forward to your responses.
|