CHAR
Quirk foundCategory: Text · Last tested 2026-09-04
Real compatibility results for the CHAR 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 | Yes | Yes (Drive import, 2026-08-29) | Quirk found |
| LibreOffice Calc | Yes | Yes (25.8.7.3, 2026-09-04) | Quirk found |
LibreOffice version history
We executed the same test cases under each LibreOffice release to show exactly when CHAR’s support changed — not documentation claims, real results.
| LibreOffice version | Verdict | Tested |
|---|---|---|
| 24.2.0.3 | Quirk found | 2026-09-04 |
| 24.8.7.2 | Quirk found | 2026-09-04 |
| 25.2.0.3 | Quirk found | 2026-09-04 |
| 25.8.7.3 | Quirk found | 2026-09-04 |
Why isn't CHAR working in LibreOffice?
CHAR exists in LibreOffice 25.8.7.3, but it is not a drop-in match for
Excel — our executed tests found real behavioral differences (detailed in the test results on this
page). If a formula that works in Excel or Google Sheets misbehaves in LibreOffice, compare your usage
against the failing cases above before assuming your data is wrong.
Why isn’t CHAR working in Google Sheets?
CHAR runs in Google Sheets, but our executed cases show it does not match
Excel’s documented behavior on every input (the failing cases are listed on this page). If a
formula that behaves one way in Excel gives you a different answer in Sheets, compare your usage
against those cases before assuming your data is wrong.
Discovered quirks
-
=CHAR(0) on
Google Sheets returned
#NUM!, but the documented/expected
result is #VALUE!.
Provenance
Microsoft docs: CHAR takes "A number between 1 and 255 specifying which character you want." Source: https://support.microsoft.com/en-us/office/char-function-bbd249c8-b36e-4a91-8017-1c133f9b837a; MISMATCH vs expected: expected '#VALUE!', got '#NUM!'
-
=CHAR(256) on
Google Sheets returned
Ā, but the documented/expected
result is #VALUE!.
Provenance
Source: https://support.microsoft.com/en-us/office/char-function-bbd249c8-b36e-4a91-8017-1c133f9b837a - valid range is 1-255; values outside it are invalid; MISMATCH vs expected: expected '#VALUE!', got 'Ā'
-
=CHAR(0) on
LibreOffice Calc returned
_x0000_, but the documented/expected
result is #VALUE!.
Provenance
Microsoft docs: CHAR takes "A number between 1 and 255 specifying which character you want." Source: https://support.microsoft.com/en-us/office/char-function-bbd249c8-b36e-4a91-8017-1c133f9b837a; MISMATCH vs expected: expected '#VALUE!', got '_x0000_'
-
=UNICODE(CHAR(160)) on
LibreOffice Calc returned
65533, but the documented/expected
result is 160.
Provenance
Excel's CHAR maps its argument through the Windows-1252 (ANSI) code page, where 160 is the non-breaking space -- which is why Microsoft's TRIM page can call CHAR(160) "the nonbreaking space character ... commonly used in web pages as the HTML entity " (https://support.microsoft.com/en-us/office/trim-function-410388fa-c5df-49c6-b16c-9e5630b479f9). LibreOffice's help instead defines CHAR as converting "a number into a character according to the current code table", so the result is platform/locale dependent there; UNICHAR(160) is the portable spelling. Source: https://support.microsoft.com/en-us/office/char-function-bbd249c8-b36e-4a91-8017-1c133f9b837a; MISMATCH vs expected: expected 160, got 65533
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 |
|---|---|---|---|---|
| =CHAR(65) | Basic code-to-character lookup | A | A | Matched |
| =CHAR(97) | Lowercase letter lookup | a | a | Matched |
| =CHAR(0) | 0 is outside CHAR's documented valid range of 1-255 -> #VALUE! | #VALUE! | #VALUE!ProvenanceMicrosoft docs: CHAR takes "A number between 1 and 255 specifying which character you want." Source: https://support.microsoft.com/en-us/office/char-function-bbd249c8-b36e-4a91-8017-1c133f9b837a |
Matched |
| =CHAR(256) | 256 is above CHAR's documented valid range of 1-255 -> #VALUE! | #VALUE! | #VALUE!ProvenanceSource: https://support.microsoft.com/en-us/office/char-function-bbd249c8-b36e-4a91-8017-1c133f9b837a - valid range is 1-255; values outside it are invalid |
Matched |
Google Sheets (executed 2026-08-29 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 |
|---|---|---|---|---|
| =CHAR(65) | Basic code-to-character lookup | A | A | Matched |
| =CHAR(97) | Lowercase letter lookup | a | a | Matched |
| =CHAR(0) | 0 is outside CHAR's documented valid range of 1-255 -> #VALUE! | #NUM! | #VALUE!ProvenanceMicrosoft docs: CHAR takes "A number between 1 and 255 specifying which character you want." Source: https://support.microsoft.com/en-us/office/char-function-bbd249c8-b36e-4a91-8017-1c133f9b837a |
Mismatch |
| =CHAR(256) | 256 is above CHAR's documented valid range of 1-255 -> #VALUE! | Ā | #VALUE!ProvenanceSource: https://support.microsoft.com/en-us/office/char-function-bbd249c8-b36e-4a91-8017-1c133f9b837a - valid range is 1-255; values outside it are invalid |
Mismatch |
LibreOffice Calc 25.8.7.3 (tested 2026-09-04)
| Formula | Description | Result | Expected | Verdict |
|---|---|---|---|---|
| =CHAR(65) | Basic code-to-character lookup | A | A | Matched |
| =CHAR(97) | Lowercase letter lookup | a | a | Matched |
| =CHAR(0) | 0 is outside CHAR's documented valid range of 1-255 -> #VALUE! | _x0000_ | #VALUE!ProvenanceMicrosoft docs: CHAR takes "A number between 1 and 255 specifying which character you want." Source: https://support.microsoft.com/en-us/office/char-function-bbd249c8-b36e-4a91-8017-1c133f9b837a |
Mismatch |
| =CHAR(256) | 256 is above CHAR's documented valid range of 1-255 -> #VALUE! | #VALUE! | #VALUE!ProvenanceSource: https://support.microsoft.com/en-us/office/char-function-bbd249c8-b36e-4a91-8017-1c133f9b837a - valid range is 1-255; values outside it are invalid |
Matched |
| =UNICODE(CHAR(160)) | What character does CHAR(160) actually produce? In Excel it is the non-breaking space (U+00A0), so UNICODE of it is 160; an engine using a different code table returns something else | 65533 | 160ProvenanceExcel's CHAR maps its argument through the Windows-1252 (ANSI) code page, where 160 is the non-breaking space -- which is why Microsoft's TRIM page can call CHAR(160) "the nonbreaking space character ... commonly used in web pages as the HTML entity " (https://support.microsoft.com/en-us/office/trim-function-410388fa-c5df-49c6-b16c-9e5630b479f9). LibreOffice's help instead defines CHAR as converting "a number into a character according to the current code table", so the result is platform/locale dependent there; UNICHAR(160) is the portable spelling. Source: https://support.microsoft.com/en-us/office/char-function-bbd249c8-b36e-4a91-8017-1c133f9b837a |
Mismatch |
Docs & syntax
- Excel (desktop): official documentation
- Google Sheets: official documentation
- LibreOffice Calc: official documentation
Related how-to recipes
- How to combine cells with a line break between them
- How to find the Nth occurrence of a character
- How to remove line breaks from a cell
Where CHAR behaves differently
- CHAR(0) and UNICHAR(0): Excel #VALUE! vs a NUL character in LibreOffice
Excel documents CHAR(0) and UNICHAR(0) as #VALUE!. LibreOffice Calc returns a NUL control character instead — the value our harness read back as the literal text _x0000_. - FVSCHEDULE: LibreOffice drops text in the rate schedule
Microsoft documents any non-numeric value in FVSCHEDULE's schedule as #VALUE!. Executed, LibreOffice 25.8.7.3 returns 1.09 for =FVSCHEDULE(1,A1:A2) with A2 = "x" - a compounding period silently dropped - while Google Sheets returns #VALUE! as documented. - TRIM strips tabs and line breaks in Google Sheets but keeps them in Excel and LibreOffice
Executed evidence: =TRIM(CHAR(9)&"Hello") keeps the tab in Excel for the web and in all four LibreOffice builds, but Google Sheets strips it (and line feeds too). Non-breaking spaces survive TRIM everywhere. The portable fix, with dates and per-engine provenance.