TRIMRANGE
Unsupported (not recognized)Category: Lookup and reference · Last tested 2026-09-01
Real compatibility results for the TRIMRANGE function: executed in Excel for the web, Google Sheets and LibreOffice Calc, with desktop Excel behavior from Microsoft’s official documentation (we do not run desktop Excel — Excel for the web is a different application and is executed separately). Syntax and links to that documentation are below.
Support matrix
| Engine | Documented | Live-tested | Verdict |
|---|---|---|---|
| Excel (desktop) | Yes | No — documented only | n/a |
| Excel for the web | — | Yes (recalc, 2026-09-01) | Supported, behaves as documented |
| Google Sheets | No | Yes (Drive import, 2026-08-31) | Unsupported (not recognized) |
| LibreOffice Calc | No | Yes (25.8.7.3, 2026-08-31) | Unsupported (not recognized) |
LibreOffice version history
We executed the same test cases under each LibreOffice release to show exactly when TRIMRANGE’s support changed — not documentation claims, real results.
| LibreOffice version | Verdict | Tested |
|---|---|---|
| 24.2.0.3 | Unsupported (not recognized) | 2026-08-31 |
| 24.8.7.2 | Unsupported (not recognized) | 2026-08-31 |
| 25.2.0.3 | Unsupported (not recognized) | 2026-08-31 |
| 25.8.7.3 | Unsupported (not recognized) | 2026-08-31 |
Why isn't TRIMRANGE working in LibreOffice?
LibreOffice Calc does not implement TRIMRANGE 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.
The same formula is documented for Excel.
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.
Why isn’t TRIMRANGE working in Google Sheets?
Google Sheets does not implement TRIMRANGE: we imported the formula into
Sheets on 2026-08-31 and every case came back #NAME?
(unrecognized function). Sheets is a rolling service with no version to pin, so this is a
statement about the service on that date, and Google’s own
function list does not document it either. Rewrite the formula with a documented
Sheets equivalent — see the
Excel ↔ Sheets equivalents table.
Discovered quirks
-
=SUM(TRIMRANGE(A1:E10)) on
Google Sheets returned
#NAME?, but the documented/expected
result is 10.
Provenance
THE PAGE PUBLISHES NO EXAMPLE TABLE AND NO ERROR REMARKS AT ALL -- every value in this file is derived from the prose, and that is said out loud rather than dressed up as a citation. What the page does document: "=TRIMRANGE(range,[trim_rows],[trim_cols])", with trim_rows and trim_cols each taking 0 = None, 1 = leading, 2 = trailing, 3 = both, and 3 as the default for each. A1:E10 IS DELIBERATELY MOSTLY BLANK: only B3:C4 holds data (1, 2, 3, 4), so trimming both leading and trailing blank rows and columns must reduce A1:E10 to exactly B3:C4, whose sum is 10. SUM is wrapped around the call because TRIMRANGE returns a RANGE rather than a scalar, and a sum is the cheapest assertion that depends on the whole trimmed shape. Microsoft's page was read live on 2026-08-31 at https://support.microsoft.com/en-us/excel/functions/trimrange-function. FETCH NOTE FOR THIS BATCH: batch F recorded every /en-us/office/<name>-function-<guid> URL returning Microsoft's 'Sorry, the page you're looking for can't be found' body; today BOTH paths serve the article again -- the GUID form redirects to /en-us/excel/functions/<slug>-function -- and every page cited in this batch came back complete (217-223 KB) in one or two attempts, with no 87 KB stub responses. Nothing here is sourced from a search snippet or a mirror.; MISMATCH vs expected: expected 10, got '#NAME?'
-
=SUM(TRIMRANGE(A1:E10,0,0)) on
Google Sheets returned
#NAME?, but the documented/expected
result is 10.
Provenance
With trim_rows = 0 and trim_cols = 0 -- both documented as "0 - None" -- nothing is trimmed and the range stays A1:E10, WHICH IS DELIBERATELY FULL OF BLANK CELLS. The sum is still 10 because blanks contribute nothing to SUM, so this case does NOT prove the range was left untrimmed; it proves only that the 0 codes are accepted and do not error. The shape difference between this and the case above is invisible to SUM, which is stated here rather than glossed: a sharper test would need a function sensitive to the range's dimensions, and ROWS/COLUMNS of a trimmed reference is exactly the sort of thing an engine without TRIMRANGE cannot be asked.; MISMATCH vs expected: expected 10, got '#NAME?'
-
=COUNT(TRIMRANGE(A1:E10)) on
Google Sheets returned
0, but the documented/expected
result is 4.
Provenance
COUNT tallies numeric cells, so it reports 4 whether or not the blanks were trimmed -- but paired with the ROWS case below it pins the shape down. The data block B3:C4 holds exactly four numbers.; MISMATCH vs expected: expected 4, got 0
-
=ROWS(TRIMRANGE(A1:E10)) on
Google Sheets returned
#NAME?, but the documented/expected
result is 2.
Provenance
THIS IS THE CASE THAT MAKES THE FILE MEAN SOMETHING. A1:E10 IS TEN ROWS OF MOSTLY BLANK CELLS; trimmed to its data block B3:C4 it is two. ROWS() reads the reference's shape rather than its values, so an engine that accepted TRIMRANGE but ignored it would return 10 here and pass every other case in this file. Derived from the documented default trim_rows = 3 ("Trims both leading and trailing blank rows"), not from any published example -- there is none.; MISMATCH vs expected: expected 2, got '#NAME?'
-
=COLUMNS(TRIMRANGE(A1:E10)) on
Google Sheets returned
#NAME?, but the documented/expected
result is 2.
Provenance
The column half of the same assertion: five columns A through E trim to the two, B and C, that hold data. Derived from the documented default trim_cols = 3.; MISMATCH vs expected: expected 2, got '#NAME?'
-
=ROWS(TRIMRANGE(A1:E10,1,1)) on
Google Sheets returned
#NAME?, but the documented/expected
result is 8.
Provenance
With trim_rows = 1 ("1 - Trims leading blank rows") the two blank rows before the data are removed and THE SIX BLANK ROWS AFTER IT ARE DELIBERATELY LEFT, so A1:E10 becomes A3:E10 -- eight rows. Derived from the prose; the page publishes no worked example of any trim code. This case and the trailing one below are what separate the three non-zero codes from each other, which the default case cannot do.; MISMATCH vs expected: expected 8, got '#NAME?'
-
=ROWS(TRIMRANGE(A1:E10,2,2)) on
Google Sheets returned
#NAME?, but the documented/expected
result is 4.
Provenance
With trim_rows = 2 ("2 - Trims trailing blank rows") the six blank rows after the data are removed and THE TWO BLANK ROWS BEFORE IT ARE DELIBERATELY LEFT, so A1:E10 becomes A1:E4 -- four rows. The page documents the equivalent Trim Refs operator spellings for these codes in a table that is worth recording as published, typo and all: "Trim All (.:.) | A1.:.E10 | TRIMRANGE(A1:E10,3,3)", "Trim Trailing (:.) | A1:.E10 | TRIMRANGE(A1:E10,2,2)", "Trim Leading (.:) | A1.:Z10 | TRIMRANGE(A1:E10,1,1)" -- note the third row's example says Z10 where its equivalent says E10, which is a slip in Microsoft's own table.; MISMATCH vs expected: expected 4, got '#NAME?'
-
=SUM(TRIMRANGE(A1:E10)) on
LibreOffice Calc returned
#NAME?, but the documented/expected
result is 10.
Provenance
THE PAGE PUBLISHES NO EXAMPLE TABLE AND NO ERROR REMARKS AT ALL -- every value in this file is derived from the prose, and that is said out loud rather than dressed up as a citation. What the page does document: "=TRIMRANGE(range,[trim_rows],[trim_cols])", with trim_rows and trim_cols each taking 0 = None, 1 = leading, 2 = trailing, 3 = both, and 3 as the default for each. A1:E10 IS DELIBERATELY MOSTLY BLANK: only B3:C4 holds data (1, 2, 3, 4), so trimming both leading and trailing blank rows and columns must reduce A1:E10 to exactly B3:C4, whose sum is 10. SUM is wrapped around the call because TRIMRANGE returns a RANGE rather than a scalar, and a sum is the cheapest assertion that depends on the whole trimmed shape. Microsoft's page was read live on 2026-08-31 at https://support.microsoft.com/en-us/excel/functions/trimrange-function. FETCH NOTE FOR THIS BATCH: batch F recorded every /en-us/office/<name>-function-<guid> URL returning Microsoft's 'Sorry, the page you're looking for can't be found' body; today BOTH paths serve the article again -- the GUID form redirects to /en-us/excel/functions/<slug>-function -- and every page cited in this batch came back complete (217-223 KB) in one or two attempts, with no 87 KB stub responses. Nothing here is sourced from a search snippet or a mirror.; MISMATCH vs expected: expected 10, got '#NAME?'
-
=SUM(TRIMRANGE(A1:E10,0,0)) on
LibreOffice Calc returned
#NAME?, but the documented/expected
result is 10.
Provenance
With trim_rows = 0 and trim_cols = 0 -- both documented as "0 - None" -- nothing is trimmed and the range stays A1:E10, WHICH IS DELIBERATELY FULL OF BLANK CELLS. The sum is still 10 because blanks contribute nothing to SUM, so this case does NOT prove the range was left untrimmed; it proves only that the 0 codes are accepted and do not error. The shape difference between this and the case above is invisible to SUM, which is stated here rather than glossed: a sharper test would need a function sensitive to the range's dimensions, and ROWS/COLUMNS of a trimmed reference is exactly the sort of thing an engine without TRIMRANGE cannot be asked.; MISMATCH vs expected: expected 10, got '#NAME?'
-
=COUNT(TRIMRANGE(A1:E10)) on
LibreOffice Calc returned
0, but the documented/expected
result is 4.
Provenance
COUNT tallies numeric cells, so it reports 4 whether or not the blanks were trimmed -- but paired with the ROWS case below it pins the shape down. The data block B3:C4 holds exactly four numbers.; MISMATCH vs expected: expected 4, got 0
-
=ROWS(TRIMRANGE(A1:E10)) on
LibreOffice Calc returned
#NAME?, but the documented/expected
result is 2.
Provenance
THIS IS THE CASE THAT MAKES THE FILE MEAN SOMETHING. A1:E10 IS TEN ROWS OF MOSTLY BLANK CELLS; trimmed to its data block B3:C4 it is two. ROWS() reads the reference's shape rather than its values, so an engine that accepted TRIMRANGE but ignored it would return 10 here and pass every other case in this file. Derived from the documented default trim_rows = 3 ("Trims both leading and trailing blank rows"), not from any published example -- there is none.; MISMATCH vs expected: expected 2, got '#NAME?'
-
=COLUMNS(TRIMRANGE(A1:E10)) on
LibreOffice Calc returned
#NAME?, but the documented/expected
result is 2.
Provenance
The column half of the same assertion: five columns A through E trim to the two, B and C, that hold data. Derived from the documented default trim_cols = 3.; MISMATCH vs expected: expected 2, got '#NAME?'
-
=ROWS(TRIMRANGE(A1:E10,1,1)) on
LibreOffice Calc returned
#NAME?, but the documented/expected
result is 8.
Provenance
With trim_rows = 1 ("1 - Trims leading blank rows") the two blank rows before the data are removed and THE SIX BLANK ROWS AFTER IT ARE DELIBERATELY LEFT, so A1:E10 becomes A3:E10 -- eight rows. Derived from the prose; the page publishes no worked example of any trim code. This case and the trailing one below are what separate the three non-zero codes from each other, which the default case cannot do.; MISMATCH vs expected: expected 8, got '#NAME?'
-
=ROWS(TRIMRANGE(A1:E10,2,2)) on
LibreOffice Calc returned
#NAME?, but the documented/expected
result is 4.
Provenance
With trim_rows = 2 ("2 - Trims trailing blank rows") the six blank rows after the data are removed and THE TWO BLANK ROWS BEFORE IT ARE DELIBERATELY LEFT, so A1:E10 becomes A1:E4 -- four rows. The page documents the equivalent Trim Refs operator spellings for these codes in a table that is worth recording as published, typo and all: "Trim All (.:.) | A1.:.E10 | TRIMRANGE(A1:E10,3,3)", "Trim Trailing (:.) | A1:.E10 | TRIMRANGE(A1:E10,2,2)", "Trim Leading (.:) | A1.:Z10 | TRIMRANGE(A1:E10,1,1)" -- note the third row's example says Z10 where its equivalent says E10, which is a slip in Microsoft's own table.; MISMATCH vs expected: expected 4, got '#NAME?'
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.
| Formula | Description | Result | Expected | Verdict |
|---|---|---|---|---|
| =SUM(TRIMRANGE(A1:E10)) | The documented default, trimming both leading and trailing blank rows and columns from a mostly-blank range | 10 | 10ProvenanceTHE PAGE PUBLISHES NO EXAMPLE TABLE AND NO ERROR REMARKS AT ALL -- every value in this file is derived from the prose, and that is said out loud rather than dressed up as a citation. What the page does document: "=TRIMRANGE(range,[trim_rows],[trim_cols])", with trim_rows and trim_cols each taking 0 = None, 1 = leading, 2 = trailing, 3 = both, and 3 as the default for each. A1:E10 IS DELIBERATELY MOSTLY BLANK: only B3:C4 holds data (1, 2, 3, 4), so trimming both leading and trailing blank rows and columns must reduce A1:E10 to exactly B3:C4, whose sum is 10. SUM is wrapped around the call because TRIMRANGE returns a RANGE rather than a scalar, and a sum is the cheapest assertion that depends on the whole trimmed shape. Microsoft's page was read live on 2026-08-31 at https://support.microsoft.com/en-us/excel/functions/trimrange-function. FETCH NOTE FOR THIS BATCH: batch F recorded every /en-us/office/<name>-function-<guid> URL returning Microsoft's 'Sorry, the page you're looking for can't be found' body; today BOTH paths serve the article again -- the GUID form redirects to /en-us/excel/functions/<slug>-function -- and every page cited in this batch came back complete (217-223 KB) in one or two attempts, with no 87 KB stub responses. Nothing here is sourced from a search snippet or a mirror. |
Matched |
| =SUM(TRIMRANGE(A1:E10,0,0)) | Trim codes of 0, documented as None, which must leave the blank cells in place | 10 | 10ProvenanceWith trim_rows = 0 and trim_cols = 0 -- both documented as "0 - None" -- nothing is trimmed and the range stays A1:E10, WHICH IS DELIBERATELY FULL OF BLANK CELLS. The sum is still 10 because blanks contribute nothing to SUM, so this case does NOT prove the range was left untrimmed; it proves only that the 0 codes are accepted and do not error. The shape difference between this and the case above is invisible to SUM, which is stated here rather than glossed: a sharper test would need a function sensitive to the range's dimensions, and ROWS/COLUMNS of a trimmed reference is exactly the sort of thing an engine without TRIMRANGE cannot be asked. |
Matched |
| =COUNT(TRIMRANGE(A1:E10)) | COUNT over the default-trimmed range, which IS sensitive to the trimmed shape | 4 | 4ProvenanceCOUNT tallies numeric cells, so it reports 4 whether or not the blanks were trimmed -- but paired with the ROWS case below it pins the shape down. The data block B3:C4 holds exactly four numbers. |
Matched |
| =ROWS(TRIMRANGE(A1:E10)) | The trimmed range's row count, which is the assertion that actually distinguishes trimming from not trimming | 2 | 2ProvenanceTHIS IS THE CASE THAT MAKES THE FILE MEAN SOMETHING. A1:E10 IS TEN ROWS OF MOSTLY BLANK CELLS; trimmed to its data block B3:C4 it is two. ROWS() reads the reference's shape rather than its values, so an engine that accepted TRIMRANGE but ignored it would return 10 here and pass every other case in this file. Derived from the documented default trim_rows = 3 ("Trims both leading and trailing blank rows"), not from any published example -- there is none. |
Matched |
| =COLUMNS(TRIMRANGE(A1:E10)) | The trimmed range's column count | 2 | 2ProvenanceThe column half of the same assertion: five columns A through E trim to the two, B and C, that hold data. Derived from the documented default trim_cols = 3. |
Matched |
| =ROWS(TRIMRANGE(A1:E10,1,1)) | Trim code 1, documented as leading only, which must leave the TRAILING blank rows in place | 8 | 8ProvenanceWith trim_rows = 1 ("1 - Trims leading blank rows") the two blank rows before the data are removed and THE SIX BLANK ROWS AFTER IT ARE DELIBERATELY LEFT, so A1:E10 becomes A3:E10 -- eight rows. Derived from the prose; the page publishes no worked example of any trim code. This case and the trailing one below are what separate the three non-zero codes from each other, which the default case cannot do. |
Matched |
| =ROWS(TRIMRANGE(A1:E10,2,2)) | Trim code 2, documented as trailing only, which must leave the LEADING blank rows in place | 4 | 4ProvenanceWith trim_rows = 2 ("2 - Trims trailing blank rows") the six blank rows after the data are removed and THE TWO BLANK ROWS BEFORE IT ARE DELIBERATELY LEFT, so A1:E10 becomes A1:E4 -- four rows. The page documents the equivalent Trim Refs operator spellings for these codes in a table that is worth recording as published, typo and all: "Trim All (.:.) | A1.:.E10 | TRIMRANGE(A1:E10,3,3)", "Trim Trailing (:.) | A1:.E10 | TRIMRANGE(A1:E10,2,2)", "Trim Leading (.:) | A1.:Z10 | TRIMRANGE(A1:E10,1,1)" -- note the third row's example says Z10 where its equivalent says E10, which is a slip in Microsoft's own table. |
Matched |
Google Sheets (executed 2026-08-31 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.
| Formula | Description | Result | Expected | Verdict |
|---|---|---|---|---|
| =SUM(TRIMRANGE(A1:E10)) | The documented default, trimming both leading and trailing blank rows and columns from a mostly-blank range | #NAME? | 10ProvenanceTHE PAGE PUBLISHES NO EXAMPLE TABLE AND NO ERROR REMARKS AT ALL -- every value in this file is derived from the prose, and that is said out loud rather than dressed up as a citation. What the page does document: "=TRIMRANGE(range,[trim_rows],[trim_cols])", with trim_rows and trim_cols each taking 0 = None, 1 = leading, 2 = trailing, 3 = both, and 3 as the default for each. A1:E10 IS DELIBERATELY MOSTLY BLANK: only B3:C4 holds data (1, 2, 3, 4), so trimming both leading and trailing blank rows and columns must reduce A1:E10 to exactly B3:C4, whose sum is 10. SUM is wrapped around the call because TRIMRANGE returns a RANGE rather than a scalar, and a sum is the cheapest assertion that depends on the whole trimmed shape. Microsoft's page was read live on 2026-08-31 at https://support.microsoft.com/en-us/excel/functions/trimrange-function. FETCH NOTE FOR THIS BATCH: batch F recorded every /en-us/office/<name>-function-<guid> URL returning Microsoft's 'Sorry, the page you're looking for can't be found' body; today BOTH paths serve the article again -- the GUID form redirects to /en-us/excel/functions/<slug>-function -- and every page cited in this batch came back complete (217-223 KB) in one or two attempts, with no 87 KB stub responses. Nothing here is sourced from a search snippet or a mirror. |
Mismatch |
| =SUM(TRIMRANGE(A1:E10,0,0)) | Trim codes of 0, documented as None, which must leave the blank cells in place | #NAME? | 10ProvenanceWith trim_rows = 0 and trim_cols = 0 -- both documented as "0 - None" -- nothing is trimmed and the range stays A1:E10, WHICH IS DELIBERATELY FULL OF BLANK CELLS. The sum is still 10 because blanks contribute nothing to SUM, so this case does NOT prove the range was left untrimmed; it proves only that the 0 codes are accepted and do not error. The shape difference between this and the case above is invisible to SUM, which is stated here rather than glossed: a sharper test would need a function sensitive to the range's dimensions, and ROWS/COLUMNS of a trimmed reference is exactly the sort of thing an engine without TRIMRANGE cannot be asked. |
Mismatch |
| =COUNT(TRIMRANGE(A1:E10)) | COUNT over the default-trimmed range, which IS sensitive to the trimmed shape | 0 | 4ProvenanceCOUNT tallies numeric cells, so it reports 4 whether or not the blanks were trimmed -- but paired with the ROWS case below it pins the shape down. The data block B3:C4 holds exactly four numbers. |
Mismatch |
| =ROWS(TRIMRANGE(A1:E10)) | The trimmed range's row count, which is the assertion that actually distinguishes trimming from not trimming | #NAME? | 2ProvenanceTHIS IS THE CASE THAT MAKES THE FILE MEAN SOMETHING. A1:E10 IS TEN ROWS OF MOSTLY BLANK CELLS; trimmed to its data block B3:C4 it is two. ROWS() reads the reference's shape rather than its values, so an engine that accepted TRIMRANGE but ignored it would return 10 here and pass every other case in this file. Derived from the documented default trim_rows = 3 ("Trims both leading and trailing blank rows"), not from any published example -- there is none. |
Mismatch |
| =COLUMNS(TRIMRANGE(A1:E10)) | The trimmed range's column count | #NAME? | 2ProvenanceThe column half of the same assertion: five columns A through E trim to the two, B and C, that hold data. Derived from the documented default trim_cols = 3. |
Mismatch |
| =ROWS(TRIMRANGE(A1:E10,1,1)) | Trim code 1, documented as leading only, which must leave the TRAILING blank rows in place | #NAME? | 8ProvenanceWith trim_rows = 1 ("1 - Trims leading blank rows") the two blank rows before the data are removed and THE SIX BLANK ROWS AFTER IT ARE DELIBERATELY LEFT, so A1:E10 becomes A3:E10 -- eight rows. Derived from the prose; the page publishes no worked example of any trim code. This case and the trailing one below are what separate the three non-zero codes from each other, which the default case cannot do. |
Mismatch |
| =ROWS(TRIMRANGE(A1:E10,2,2)) | Trim code 2, documented as trailing only, which must leave the LEADING blank rows in place | #NAME? | 4ProvenanceWith trim_rows = 2 ("2 - Trims trailing blank rows") the six blank rows after the data are removed and THE TWO BLANK ROWS BEFORE IT ARE DELIBERATELY LEFT, so A1:E10 becomes A1:E4 -- four rows. The page documents the equivalent Trim Refs operator spellings for these codes in a table that is worth recording as published, typo and all: "Trim All (.:.) | A1.:.E10 | TRIMRANGE(A1:E10,3,3)", "Trim Trailing (:.) | A1:.E10 | TRIMRANGE(A1:E10,2,2)", "Trim Leading (.:) | A1.:Z10 | TRIMRANGE(A1:E10,1,1)" -- note the third row's example says Z10 where its equivalent says E10, which is a slip in Microsoft's own table. |
Mismatch |
LibreOffice Calc 25.8.7.3 (tested 2026-08-31)
| Formula | Description | Result | Expected | Verdict |
|---|---|---|---|---|
| =SUM(TRIMRANGE(A1:E10)) | The documented default, trimming both leading and trailing blank rows and columns from a mostly-blank range | #NAME? | 10ProvenanceTHE PAGE PUBLISHES NO EXAMPLE TABLE AND NO ERROR REMARKS AT ALL -- every value in this file is derived from the prose, and that is said out loud rather than dressed up as a citation. What the page does document: "=TRIMRANGE(range,[trim_rows],[trim_cols])", with trim_rows and trim_cols each taking 0 = None, 1 = leading, 2 = trailing, 3 = both, and 3 as the default for each. A1:E10 IS DELIBERATELY MOSTLY BLANK: only B3:C4 holds data (1, 2, 3, 4), so trimming both leading and trailing blank rows and columns must reduce A1:E10 to exactly B3:C4, whose sum is 10. SUM is wrapped around the call because TRIMRANGE returns a RANGE rather than a scalar, and a sum is the cheapest assertion that depends on the whole trimmed shape. Microsoft's page was read live on 2026-08-31 at https://support.microsoft.com/en-us/excel/functions/trimrange-function. FETCH NOTE FOR THIS BATCH: batch F recorded every /en-us/office/<name>-function-<guid> URL returning Microsoft's 'Sorry, the page you're looking for can't be found' body; today BOTH paths serve the article again -- the GUID form redirects to /en-us/excel/functions/<slug>-function -- and every page cited in this batch came back complete (217-223 KB) in one or two attempts, with no 87 KB stub responses. Nothing here is sourced from a search snippet or a mirror. |
Mismatch |
| =SUM(TRIMRANGE(A1:E10,0,0)) | Trim codes of 0, documented as None, which must leave the blank cells in place | #NAME? | 10ProvenanceWith trim_rows = 0 and trim_cols = 0 -- both documented as "0 - None" -- nothing is trimmed and the range stays A1:E10, WHICH IS DELIBERATELY FULL OF BLANK CELLS. The sum is still 10 because blanks contribute nothing to SUM, so this case does NOT prove the range was left untrimmed; it proves only that the 0 codes are accepted and do not error. The shape difference between this and the case above is invisible to SUM, which is stated here rather than glossed: a sharper test would need a function sensitive to the range's dimensions, and ROWS/COLUMNS of a trimmed reference is exactly the sort of thing an engine without TRIMRANGE cannot be asked. |
Mismatch |
| =COUNT(TRIMRANGE(A1:E10)) | COUNT over the default-trimmed range, which IS sensitive to the trimmed shape | 0 | 4ProvenanceCOUNT tallies numeric cells, so it reports 4 whether or not the blanks were trimmed -- but paired with the ROWS case below it pins the shape down. The data block B3:C4 holds exactly four numbers. |
Mismatch |
| =ROWS(TRIMRANGE(A1:E10)) | The trimmed range's row count, which is the assertion that actually distinguishes trimming from not trimming | #NAME? | 2ProvenanceTHIS IS THE CASE THAT MAKES THE FILE MEAN SOMETHING. A1:E10 IS TEN ROWS OF MOSTLY BLANK CELLS; trimmed to its data block B3:C4 it is two. ROWS() reads the reference's shape rather than its values, so an engine that accepted TRIMRANGE but ignored it would return 10 here and pass every other case in this file. Derived from the documented default trim_rows = 3 ("Trims both leading and trailing blank rows"), not from any published example -- there is none. |
Mismatch |
| =COLUMNS(TRIMRANGE(A1:E10)) | The trimmed range's column count | #NAME? | 2ProvenanceThe column half of the same assertion: five columns A through E trim to the two, B and C, that hold data. Derived from the documented default trim_cols = 3. |
Mismatch |
| =ROWS(TRIMRANGE(A1:E10,1,1)) | Trim code 1, documented as leading only, which must leave the TRAILING blank rows in place | #NAME? | 8ProvenanceWith trim_rows = 1 ("1 - Trims leading blank rows") the two blank rows before the data are removed and THE SIX BLANK ROWS AFTER IT ARE DELIBERATELY LEFT, so A1:E10 becomes A3:E10 -- eight rows. Derived from the prose; the page publishes no worked example of any trim code. This case and the trailing one below are what separate the three non-zero codes from each other, which the default case cannot do. |
Mismatch |
| =ROWS(TRIMRANGE(A1:E10,2,2)) | Trim code 2, documented as trailing only, which must leave the LEADING blank rows in place | #NAME? | 4ProvenanceWith trim_rows = 2 ("2 - Trims trailing blank rows") the six blank rows after the data are removed and THE TWO BLANK ROWS BEFORE IT ARE DELIBERATELY LEFT, so A1:E10 becomes A1:E4 -- four rows. The page documents the equivalent Trim Refs operator spellings for these codes in a table that is worth recording as published, typo and all: "Trim All (.:.) | A1.:.E10 | TRIMRANGE(A1:E10,3,3)", "Trim Trailing (:.) | A1:.E10 | TRIMRANGE(A1:E10,2,2)", "Trim Leading (.:) | A1.:Z10 | TRIMRANGE(A1:E10,1,1)" -- note the third row's example says Z10 where its equivalent says E10, which is a slip in Microsoft's own table. |
Mismatch |
Docs & syntax
- Excel (desktop): official documentation
Where TRIMRANGE behaves differently
- When the documentation is wrong: 29 vendor doc defects found by execution
Independent derivation across 586 executed functions found 29 places where a vendor's own page is contradicted by its own inputs, its own table, or the live engine: 23 Microsoft, 5 Google, 1 LibreOffice. Includes T.INV.2T's doubly-wrong Remark, DISC's stale figure, ISDATE's page against the live engine, and RAWSUBTRACT's help against LibreOffice's own result.