← All functions

ARRAY_CONSTRAIN

Unsupported (not recognized)

Category: Array · Last tested 2026-09-01

Real compatibility results for the ARRAY_CONSTRAIN function: executed in Excel for the web, Google Sheets and LibreOffice Calc, measured against Google’s published documentation. Excel does not document ARRAY_CONSTRAIN, so this page makes no claim about Excel. Syntax and links to that documentation are below.

Support matrix

EngineDocumentedLive-testedVerdict
Excel (desktop)No n/a (not an Excel function) n/a
Excel for the web— Yes (recalc, 2026-09-01) Unsupported (not recognized)
Google SheetsYes Yes (Drive import, 2026-09-01) Supported, behaves as documented
LibreOffice CalcNo Yes (25.8.7.3, 2026-09-01) Unsupported (not recognized)

LibreOffice version history

We executed the same test cases under each LibreOffice release to show exactly when ARRAY_CONSTRAIN’s support changed — not documentation claims, real results.

LibreOffice versionVerdictTested
24.2.0.3 Unsupported (not recognized) 2026-09-01
24.8.7.2 Unsupported (not recognized) 2026-09-01
25.2.0.3 Unsupported (not recognized) 2026-09-01
25.8.7.3 Unsupported (not recognized) 2026-09-01

Why isn't ARRAY_CONSTRAIN working in LibreOffice?

LibreOffice Calc does not implement ARRAY_CONSTRAIN as of 25.8.7.3 — in our executed tests it returns a #NAME? (unrecognized function) error. This is not a typo or a settings problem, and saving the file as .xlsx does not change it: the function simply isn’t available yet. Watch the LibreOffice version support page — we re-run every test on each new release, so it will flip to Supported here as soon as it lands.

Discovered quirks

Executed test cases

Excel for the web (executed 2026-09-01 via OneDrive recalculation)

These values come from Excel for the web, not from desktop Excel. They are two different implementations of the calculation engine, and this run measured only the web one: the corpus was uploaded to OneDrive as .xlsx, recalculated by Excel for the web on open, and downloaded again for readback. Excel for the web is a rolling service with no pinnable version, so the run is identified by its date. Where a value here disagrees with the Expected column — which is Microsoft’s documentation of the desktop product — we cannot tell you whether the web engine diverges from the desktop one or the documentation is wrong about both, because we do not run desktop Excel.

FormulaDescriptionResultExpectedVerdict
=ARRAY_CONSTRAIN(A1:C10, 2, 3) The page's own Sample Usage line: a 10x3 range constrained to 2x3 {#NAME?, #NAME?, #NAME?, #NAME?, #NAME?, #NAME?} {{1, 2, 3}, {4, 5, 6}}
Provenance

The page's first sample formula, verbatim. The result is the TOP-LEFT 2x3 block, which is what "constrains" has to mean if the function is to be usable at all -- the page never says which corner it keeps, and this case is what makes that concrete. ARRAY RESULT: this case spills more than one cell, so it is written as a real array formula over an explicit check_range and compared cell by cell in row-major order, the same convention SORT, UNIQUE, SEQUENCE and TEXTSPLIT already use in this corpus. ARRAY_CONSTRAIN's page publishes NO results at all: two Sample Usage formulas, a three-line argument list and one Note. Every value below is DERIVED from the one-line definition, "Constrains an array result to a specified size", plus the argument descriptions "the number of rows the result should contain" and "the number of columns the result should contain". The 10x3 block of the integers 1..30, filled row-major, is this corpus's; the page names A1:C10 without populating it. Google's ARRAY_CONSTRAIN page, read live on 2026-08-31 at https://support.google.com/docs/answer/3267036. BATCH PROVENANCE (batch H, the first Sheets/LibreOffice-only batch). Every function in this batch has x == false in docs/data/compat.json: it is a Google Sheets function that Microsoft does not document at all, so this corpus makes NO claim about it in that engine and nothing here is measured against that vendor's documentation. The authority is Google's own support.google.com function page, cited by full URL and by the date it was read -- Google publishes no version number for these pages, so a bare URL dates nothing. WHAT GOOGLE ACTUALLY PRINTS, WHICH IS LESS THAN IT LOOKS: most of these pages carry a 'Sample Usage' block of FORMULAS WITH NO RESULTS. Where a value below is Google's own published output the note says so; where it is derived from the page's stated semantics the note says that instead, and says from which sentence. No value in this batch was taken from a search snippet, a blog or a mirror. LIBREOFFICE: probed on all four pinned builds (24.2.0.3, 24.8.7.2, 25.2.0.3, 25.8.7.3) in five storage spellings -- plain, _xlfn., COM.MICROSOFT., ORG.OPENOFFICE. and _xlfn.ORG.OPENOFFICE. -- and #NAME? under every one of them, so the expected values below describe Google Sheets and the LibreOffice column records absence.

Mismatch
=ARRAY_CONSTRAIN(A1:C10, 3, 1) Constraining columns harder than rows {#NAME?, #NAME?, #NAME?} {1, 4, 7}
Provenance

DERIVED. Rows and columns are constrained independently, so 3 rows by 1 column keeps the first cell of each of the first three rows. ARRAY RESULT: this case spills more than one cell, so it is written as a real array formula over an explicit check_range and compared cell by cell in row-major order, the same convention SORT, UNIQUE, SEQUENCE and TEXTSPLIT already use in this corpus. Google's ARRAY_CONSTRAIN page, read live on 2026-08-31 at https://support.google.com/docs/answer/3267036.

Mismatch
=ARRAY_CONSTRAIN(A1:C10, 1, 1) The smallest constraint the arguments allow #NAME? 1
Provenance

DERIVED; a 1x1 result is a single value and needs no spill range. Google's ARRAY_CONSTRAIN page, read live on 2026-08-31 at https://support.google.com/docs/answer/3267036.

Mismatch
=ARRAY_CONSTRAIN(SORT(A1:C10, 1, FALSE), 2, 3) The composition the page's second sample and its Note are about {#NAME?, #NAME?, #NAME?, #NAME?, #NAME?, #NAME?} {{28, 29, 30}, {25, 26, 27}}
Provenance

The shape of the page's second Sample Usage line, ARRAY_CONSTRAIN(SORT(A1:F100, 1, TRUE), 10, 6), scaled to this corpus's 10x3 block and sorted DESCENDING so the constrained result cannot coincide with the unsorted one. It is the case the page's Note is about: "Generally used in combination with other functions that return an array result when a fewer number of rows or columns are desired." Sorting 1..30 by its first column descending puts row (28,29,30) first and (25,26,27) second. ARRAY RESULT: this case spills more than one cell, so it is written as a real array formula over an explicit check_range and compared cell by cell in row-major order, the same convention SORT, UNIQUE, SEQUENCE and TEXTSPLIT already use in this corpus. Google's ARRAY_CONSTRAIN page, read live on 2026-08-31 at https://support.google.com/docs/answer/3267036. POST-EXECUTION ADDENDUM -- THE ONLY CROSS-BUILD DIFFERENCE IN THIS BATCH, AND IT IS ABOUT AN ERROR CODE, NOT A VALUE. This case returns #NAME? on 24.2.0.3 but #VALUE! on 24.8.7.2, 25.2.0.3 and 25.8.7.3. ARRAY_CONSTRAIN is absent from all four builds under all five storage spellings, so the difference is not about ARRAY_CONSTRAIN at all -- it is about the nested SORT. The harness stores SORT as _xlfn._xlws.SORT; 24.2 does not implement it, so the whole expression fails to resolve a name and the result is #NAME?, while on the three later builds SORT resolves and LibreOffice reports the still-unrecognised OUTER name as #VALUE! instead. LibreOffice's error code for an unknown function is therefore not stable: it depends on whether that function's ARGUMENTS resolved. Every other ARRAY_CONSTRAIN case in this file is #NAME? on all four builds, which is what the published verdict rests on.

Mismatch

Google Sheets (executed 2026-09-01 via Drive import)

Google Sheets is a rolling service with no pinnable version, so this run is identified by its date. The corpus was imported to Drive as .xlsx, recalculated by Sheets, and exported back for readback.

FormulaDescriptionResultExpectedVerdict
=ARRAY_CONSTRAIN(A1:C10, 2, 3) The page's own Sample Usage line: a 10x3 range constrained to 2x3 {1, 2.0, 3.0, 4.0, 5.0, 6.0} {{1, 2, 3}, {4, 5, 6}}
Provenance

The page's first sample formula, verbatim. The result is the TOP-LEFT 2x3 block, which is what "constrains" has to mean if the function is to be usable at all -- the page never says which corner it keeps, and this case is what makes that concrete. ARRAY RESULT: this case spills more than one cell, so it is written as a real array formula over an explicit check_range and compared cell by cell in row-major order, the same convention SORT, UNIQUE, SEQUENCE and TEXTSPLIT already use in this corpus. ARRAY_CONSTRAIN's page publishes NO results at all: two Sample Usage formulas, a three-line argument list and one Note. Every value below is DERIVED from the one-line definition, "Constrains an array result to a specified size", plus the argument descriptions "the number of rows the result should contain" and "the number of columns the result should contain". The 10x3 block of the integers 1..30, filled row-major, is this corpus's; the page names A1:C10 without populating it. Google's ARRAY_CONSTRAIN page, read live on 2026-08-31 at https://support.google.com/docs/answer/3267036. BATCH PROVENANCE (batch H, the first Sheets/LibreOffice-only batch). Every function in this batch has x == false in docs/data/compat.json: it is a Google Sheets function that Microsoft does not document at all, so this corpus makes NO claim about it in that engine and nothing here is measured against that vendor's documentation. The authority is Google's own support.google.com function page, cited by full URL and by the date it was read -- Google publishes no version number for these pages, so a bare URL dates nothing. WHAT GOOGLE ACTUALLY PRINTS, WHICH IS LESS THAN IT LOOKS: most of these pages carry a 'Sample Usage' block of FORMULAS WITH NO RESULTS. Where a value below is Google's own published output the note says so; where it is derived from the page's stated semantics the note says that instead, and says from which sentence. No value in this batch was taken from a search snippet, a blog or a mirror. LIBREOFFICE: probed on all four pinned builds (24.2.0.3, 24.8.7.2, 25.2.0.3, 25.8.7.3) in five storage spellings -- plain, _xlfn., COM.MICROSOFT., ORG.OPENOFFICE. and _xlfn.ORG.OPENOFFICE. -- and #NAME? under every one of them, so the expected values below describe Google Sheets and the LibreOffice column records absence.

Matched
=ARRAY_CONSTRAIN(A1:C10, 3, 1) Constraining columns harder than rows {1, 4.0, 7.0} {1, 4, 7}
Provenance

DERIVED. Rows and columns are constrained independently, so 3 rows by 1 column keeps the first cell of each of the first three rows. ARRAY RESULT: this case spills more than one cell, so it is written as a real array formula over an explicit check_range and compared cell by cell in row-major order, the same convention SORT, UNIQUE, SEQUENCE and TEXTSPLIT already use in this corpus. Google's ARRAY_CONSTRAIN page, read live on 2026-08-31 at https://support.google.com/docs/answer/3267036.

Matched
=ARRAY_CONSTRAIN(A1:C10, 1, 1) The smallest constraint the arguments allow 1 1
Provenance

DERIVED; a 1x1 result is a single value and needs no spill range. Google's ARRAY_CONSTRAIN page, read live on 2026-08-31 at https://support.google.com/docs/answer/3267036.

Matched
=ARRAY_CONSTRAIN(SORT(A1:C10, 1, FALSE), 2, 3) The composition the page's second sample and its Note are about {28, 29.0, 30.0, 25.0, 26.0, 27.0} {{28, 29, 30}, {25, 26, 27}}
Provenance

The shape of the page's second Sample Usage line, ARRAY_CONSTRAIN(SORT(A1:F100, 1, TRUE), 10, 6), scaled to this corpus's 10x3 block and sorted DESCENDING so the constrained result cannot coincide with the unsorted one. It is the case the page's Note is about: "Generally used in combination with other functions that return an array result when a fewer number of rows or columns are desired." Sorting 1..30 by its first column descending puts row (28,29,30) first and (25,26,27) second. ARRAY RESULT: this case spills more than one cell, so it is written as a real array formula over an explicit check_range and compared cell by cell in row-major order, the same convention SORT, UNIQUE, SEQUENCE and TEXTSPLIT already use in this corpus. Google's ARRAY_CONSTRAIN page, read live on 2026-08-31 at https://support.google.com/docs/answer/3267036. POST-EXECUTION ADDENDUM -- THE ONLY CROSS-BUILD DIFFERENCE IN THIS BATCH, AND IT IS ABOUT AN ERROR CODE, NOT A VALUE. This case returns #NAME? on 24.2.0.3 but #VALUE! on 24.8.7.2, 25.2.0.3 and 25.8.7.3. ARRAY_CONSTRAIN is absent from all four builds under all five storage spellings, so the difference is not about ARRAY_CONSTRAIN at all -- it is about the nested SORT. The harness stores SORT as _xlfn._xlws.SORT; 24.2 does not implement it, so the whole expression fails to resolve a name and the result is #NAME?, while on the three later builds SORT resolves and LibreOffice reports the still-unrecognised OUTER name as #VALUE! instead. LibreOffice's error code for an unknown function is therefore not stable: it depends on whether that function's ARGUMENTS resolved. Every other ARRAY_CONSTRAIN case in this file is #NAME? on all four builds, which is what the published verdict rests on.

Matched

LibreOffice Calc 25.8.7.3 (tested 2026-09-01)

FormulaDescriptionResultExpectedVerdict
=ARRAY_CONSTRAIN(A1:C10, 2, 3) The page's own Sample Usage line: a 10x3 range constrained to 2x3 {#NAME?, #NAME?, #NAME?, #NAME?, #NAME?, #NAME?} {{1, 2, 3}, {4, 5, 6}}
Provenance

The page's first sample formula, verbatim. The result is the TOP-LEFT 2x3 block, which is what "constrains" has to mean if the function is to be usable at all -- the page never says which corner it keeps, and this case is what makes that concrete. ARRAY RESULT: this case spills more than one cell, so it is written as a real array formula over an explicit check_range and compared cell by cell in row-major order, the same convention SORT, UNIQUE, SEQUENCE and TEXTSPLIT already use in this corpus. ARRAY_CONSTRAIN's page publishes NO results at all: two Sample Usage formulas, a three-line argument list and one Note. Every value below is DERIVED from the one-line definition, "Constrains an array result to a specified size", plus the argument descriptions "the number of rows the result should contain" and "the number of columns the result should contain". The 10x3 block of the integers 1..30, filled row-major, is this corpus's; the page names A1:C10 without populating it. Google's ARRAY_CONSTRAIN page, read live on 2026-08-31 at https://support.google.com/docs/answer/3267036. BATCH PROVENANCE (batch H, the first Sheets/LibreOffice-only batch). Every function in this batch has x == false in docs/data/compat.json: it is a Google Sheets function that Microsoft does not document at all, so this corpus makes NO claim about it in that engine and nothing here is measured against that vendor's documentation. The authority is Google's own support.google.com function page, cited by full URL and by the date it was read -- Google publishes no version number for these pages, so a bare URL dates nothing. WHAT GOOGLE ACTUALLY PRINTS, WHICH IS LESS THAN IT LOOKS: most of these pages carry a 'Sample Usage' block of FORMULAS WITH NO RESULTS. Where a value below is Google's own published output the note says so; where it is derived from the page's stated semantics the note says that instead, and says from which sentence. No value in this batch was taken from a search snippet, a blog or a mirror. LIBREOFFICE: probed on all four pinned builds (24.2.0.3, 24.8.7.2, 25.2.0.3, 25.8.7.3) in five storage spellings -- plain, _xlfn., COM.MICROSOFT., ORG.OPENOFFICE. and _xlfn.ORG.OPENOFFICE. -- and #NAME? under every one of them, so the expected values below describe Google Sheets and the LibreOffice column records absence.

Mismatch
=ARRAY_CONSTRAIN(A1:C10, 3, 1) Constraining columns harder than rows {#NAME?, #NAME?, #NAME?} {1, 4, 7}
Provenance

DERIVED. Rows and columns are constrained independently, so 3 rows by 1 column keeps the first cell of each of the first three rows. ARRAY RESULT: this case spills more than one cell, so it is written as a real array formula over an explicit check_range and compared cell by cell in row-major order, the same convention SORT, UNIQUE, SEQUENCE and TEXTSPLIT already use in this corpus. Google's ARRAY_CONSTRAIN page, read live on 2026-08-31 at https://support.google.com/docs/answer/3267036.

Mismatch
=ARRAY_CONSTRAIN(A1:C10, 1, 1) The smallest constraint the arguments allow #NAME? 1
Provenance

DERIVED; a 1x1 result is a single value and needs no spill range. Google's ARRAY_CONSTRAIN page, read live on 2026-08-31 at https://support.google.com/docs/answer/3267036.

Mismatch
=ARRAY_CONSTRAIN(SORT(A1:C10, 1, FALSE), 2, 3) The composition the page's second sample and its Note are about {#VALUE!, #VALUE!, #VALUE!, #VALUE!, #VALUE!, #VALUE!} {{28, 29, 30}, {25, 26, 27}}
Provenance

The shape of the page's second Sample Usage line, ARRAY_CONSTRAIN(SORT(A1:F100, 1, TRUE), 10, 6), scaled to this corpus's 10x3 block and sorted DESCENDING so the constrained result cannot coincide with the unsorted one. It is the case the page's Note is about: "Generally used in combination with other functions that return an array result when a fewer number of rows or columns are desired." Sorting 1..30 by its first column descending puts row (28,29,30) first and (25,26,27) second. ARRAY RESULT: this case spills more than one cell, so it is written as a real array formula over an explicit check_range and compared cell by cell in row-major order, the same convention SORT, UNIQUE, SEQUENCE and TEXTSPLIT already use in this corpus. Google's ARRAY_CONSTRAIN page, read live on 2026-08-31 at https://support.google.com/docs/answer/3267036. POST-EXECUTION ADDENDUM -- THE ONLY CROSS-BUILD DIFFERENCE IN THIS BATCH, AND IT IS ABOUT AN ERROR CODE, NOT A VALUE. This case returns #NAME? on 24.2.0.3 but #VALUE! on 24.8.7.2, 25.2.0.3 and 25.8.7.3. ARRAY_CONSTRAIN is absent from all four builds under all five storage spellings, so the difference is not about ARRAY_CONSTRAIN at all -- it is about the nested SORT. The harness stores SORT as _xlfn._xlws.SORT; 24.2 does not implement it, so the whole expression fails to resolve a name and the result is #NAME?, while on the three later builds SORT resolves and LibreOffice reports the still-unrecognised OUTER name as #VALUE! instead. LibreOffice's error code for an unknown function is therefore not stable: it depends on whether that function's ARGUMENTS resolved. Every other ARRAY_CONSTRAIN case in this file is #NAME? on all four builds, which is what the published verdict rests on.

Mismatch

Docs & syntax

Where ARRAY_CONSTRAIN behaves differently