NETWORKDAYS.INTL in ONLYOFFICE: Custom Weekend Workday Counts
Count workdays in ONLYOFFICE with custom weekend schedules and holiday exclusions; includes reproducible date examples and validation cautions.
Verification status: Official documentation referenced; example outcomes independently reasoned or arithmetically checked where stated. Not executed in ONLYOFFICE Spreadsheet Editor. How formula examples are checked
Quick answer: =NETWORKDAYS.INTL(DATE(2026,10,9),DATE(2026,10,20)) has an independently calculated expected result of 8 when Saturday and Sunday are nonworking. Supply a third argument such as 7 to use a Friday/Saturday weekend instead. The exact argument order and the allowed weekend codes come from the official ONLYOFFICE NETWORKDAYS.INTL reference, accessed 2026-10-13. These figures are not observed native ONLYOFFICE outputs.
Syntax: order, types and defaults
=NETWORKDAYS.INTL(start_date, end_date, [weekend], [holidays])
| Argument | Required | What to enter |
|---|---|---|
start_date |
Yes | A valid date cell or date-producing expression such as DATE(2026,10,9). |
end_date |
Yes | The last date of the interval. The duration is counted in workdays, not elapsed 24-hour blocks. |
weekend |
No | A documented numeric weekend code or a seven-character 0/1 mask. Omitted means Saturday and Sunday (1). |
holidays |
No | Extra nonworking dates, ideally a real date range such as $D$2:$D$3. This is fourth, not third. |
The ONLYOFFICE function help supports dates made with DATE and a cell range containing holiday dates. Its reference is unversioned. It does not provide an edition-specific execution matrix, so this guide does not claim native results for all Desktop/online releases.
Numeric weekend choices
| Weekend value | Days treated as nonworking |
|---|---|
1 or omitted |
Saturday and Sunday |
2 |
Sunday and Monday |
3 |
Monday and Tuesday |
4 |
Tuesday and Wednesday |
5 |
Wednesday and Thursday |
6 |
Thursday and Friday |
7 |
Friday and Saturday |
11 |
Sunday only |
12 |
Monday only |
13 |
Tuesday only |
14 |
Wednesday only |
15 |
Thursday only |
16 |
Friday only |
17 |
Saturday only |
A seven-character mask runs Monday through Sunday, left to right. A 1 means nonworking; a 0 means working: "0000011" means Saturday/Sunday; "0000110" means Friday/Saturday; and "1000001" means Monday/Sunday. The official ONLYOFFICE article expressly calls "1111111" invalid. Treat a mask with the wrong length or nonbinary characters as a configuration error; the precise ONLYOFFICE error value still needs native confirmation.
Reproduce this schedule in a blank workbook
Use the following exact cells, entering each date via the DATE function to avoid regional text-date ambiguity:
| Cell | Value or formula | Expected displayed date | Meaning |
|---|---|---|---|
A2 |
=DATE(2026,10,9) |
2026-10-09 (Friday) | Report begins |
B2 |
=DATE(2026,10,20) |
2026-10-20 (Tuesday) | Report ends |
D2 |
=DATE(2026,10,12) |
2026-10-12 (Monday) | Illustrative company closure |
D3 |
=DATE(2026,10,19) |
2026-10-19 (Monday) | Illustrative company closure |
Format A2, B2 and D2:D3 as dates. The closure days are example inputs, not a claim about a particular country’s statutory calendar. Type the following formulas into other empty cells; do not paste formula strings into A2/B2/D2/D3 because those cells provide inputs.
| Formula | Expected independent output | Why |
|---|---|---|
=NETWORKDAYS.INTL(A2,B2) |
8 | Default Sat/Sun; inclusive interval |
=NETWORKDAYS.INTL(A2,B2,1,$D$2:$D$3) |
6 | Default Sat/Sun with two excluded Monday closures |
=NETWORKDAYS.INTL(A2,B2,7,$D$2:$D$3) |
6 | Friday/Saturday weekends with two excluded Mondays |
=NETWORKDAYS.INTL(A2,B2,11,$D$2:$D$3) |
8 | Sunday-only weekends |
=NETWORKDAYS.INTL(A2,B2,"1000001",$D$2:$D$3) |
8 | Monday+Sunday nonworking; both closures already nonworking |
=NETWORKDAYS.INTL(A2,A2,1) |
1 | Single Friday expected to count as one workday |
=NETWORKDAYS.INTL(D2,D2,1,$D$2:$D$3) |
0 | Single date present in holidays is excluded |
Sanity-check the arithmetic: From Friday October 9 through Tuesday October 20 inclusive there are 12 calendar dates and four Saturday/Sunday dates, giving 8 default weekdays. Two additional Monday closures leave 6. In the Friday/Saturday-weekend case, Sunday becomes an ordinary workday; with both Monday closures excluded, the independent total is also 6. In a Monday/Sunday mask, both Monday closure dates were already nonworking, so adding them to the holiday list changes nothing.
Validation classification: the table values are outputs of a separately written Python datetime weekday model , not native ONLYOFFICE observations. Counting both endpoints is an independently modelled spreadsheet convention; the concise ONLYOFFICE reference does not separately describe every endpoint case. Confirm the one-day examples before relying on them.
Advanced pattern: a configurable operations calendar
Place a valid weekend code in E2 (e.g., 7) and all company closures in D2:D3. The parameterized formula is:
=NETWORKDAYS.INTL(A2,B2,$E$2,$D$2:$D$3)
Expected with E2=7: 6. This allows a single worksheet to serve different departments. A different business with only Sunday off could set E2 to 11 and would get an independently expected 8 with the same two Monday closures. Confirm dates in D2:D3 are genuine spreadsheet dates, not text strings that merely look like dates. If you fill the formula down, $ fixes the closure list; adjust the absolute references when your closure table grows.
To calculate the fraction of active days in the complete 12-day reporting interval, use:
=NETWORKDAYS.INTL(A2,B2,7,$D$2:$D$3)/(B2-A2+1)
The independent ratio is 6/12 = 0.5, so a percentage-formatted result would show 50%. This is an operations-planning ratio, not a payroll or legal entitlement calculation. Avoid using a holiday list that includes duplicate dates to imply that the same day should be excluded twice; the official reference does not describe duplicates explicitly, so test before relying on that edge case.
Troubleshooting and limits
- Dates appear as strings or unexpected integers: Enter dates with
DATEand set a Date number format.DATEVALUEand regional text-date parsing may differ by locale; a visible10/12/2026is ambiguous in different regions. - The holiday list has no effect: Check if the excluded date is already a weekend under your chosen mask. Check whether D2:D3 contain date values and whether your range was entered as the fourth argument.
- Holiday dates shift while copying: Lock the range
$D$2:$D$3; maintain a verified list for the relevant calendar year. - You counted calendar days instead of workdays:
DAYScalculates a date difference;NETWORKDAYS.INTLskips selected nonworking days. In a custom schedule a Saturday may be working, so counting generic weekdays is wrong. - Unrecognized weekend code or malformed mask: Use exactly one of the documented codes or a seven-character Monday-first bitmask. The specific native error type for all invalid inputs is untested.
- End date precedes start date: Microsoft’s Excel guide documents a negative count, but the checked ONLYOFFICE page does not specify this behaviour. Native ONLYOFFICE reverse-range output remains unverified; it is intentionally omitted from the expected-results fixtures.
- Every day marked nonworking: ONLYOFFICE explicitly says
"1111111"is invalid. Microsoft’s documentation for Excel NETWORKDAYS.INTL describes it as returning zero; this is a documentation-level divergence, not proof of an implementation difference. - Filtered rows, blank holiday entries, invalid dates and 1904-date-system workbooks: These cases are not resolved by the concise official function reference. Test the target edition and its date-system setting before using this calculation for production deadlines.
Differences from similar functions and from Excel
The ONLYOFFICE NETWORKDAYS reference accepts start_date, end_date and optional holidays, without a custom weekend selector. NETWORKDAYS.INTL adds the selector and therefore moves holidays to the fourth position. The ONLYOFFICE WORKDAY.INTL reference instead moves a date by a workday offset; it does not report the number of included workdays in a date interval. These functions perform different calculations.
The Microsoft Excel NETWORKDAYS.INTL documentation lists the same argument order and weekend-code mapping. That establishes documented syntax compatibility, not full evaluation parity for imported workbooks. The all-days-weekend mask, reverse intervals, edge cases, locale behaviour and Desktop-vs-online releases require native ONLYOFFICE comparison.
Versions, platforms and verification limits
The ONLYOFFICE Spreadsheet Editor function catalogue includes NETWORKDAYS.INTL. The Formula tab documentation illustrates the online and Desktop interfaces. Neither source is a definitive version-by-version feature matrix. As of 2026-10-13, the syntax above is reference-checked for the current English, unversioned documentation, not executed in ONLYOFFICE Desktop Editors or web Docs. Native Desktop/web execution, localized input, endpoint behavior and date-system boundaries remain untested. Verify these cases in the installed editor before relying on them.
Source trail (accessed 2026-10-13): function definition / weekend codes / seven-character mask; related workday function; function catalog and formula entry; Excel syntax comparator.