CODE in PlanMaker 2026: Find the First Character Code
Learn PlanMaker CODE syntax, leading-space diagnostics, empty-string behavior, and Excel compatibility.
Verification status: Official documentation referenced; example outcomes independently reasoned or arithmetically checked where stated. Not executed in SoftMaker PlanMaker 2026. How formula examples are checked
CODE in SoftMaker PlanMaker 2026
Quick answer: =CODE("Arthur") returns 65, the ANSI code of its first character, A. CODE is useful for diagnosing hidden leading spaces, identifying punctuation, and understanding why imported identifiers compare differently. One important documented PlanMaker-specific example is =CODE("") returning 0; do not assume an Excel workbook behaves identically without testing it. [S1]
Official syntax, types, and defaults
=CODE(Text)
| Argument | Required? | Type and meaning | Default |
|---|---|---|---|
Text |
Yes | Text string (or a reference to text) whose first character’s ANSI code is returned. | None |
The argument is one text expression, not a range to scan character-by-character. The documented English syntax has no optional parameters and no built-in start-position argument. There is no separator issue in these one-argument examples; regional formula naming, text encoding and operating-system code pages can still require additional checking. SoftMaker does not document how all non-text arguments are coerced in the short entry, so the examples use text. [S1, S2, S3]
Reproducible worksheet: inspect the first character of IDs
In a new PlanMaker sheet enter Raw import into A1 and Leading character code in B1. Type the strings below into column A (preserve exact capitalization and spaces), then type =CODE(A2) in B2 and copy to B7. The outcomes are independent printable-ASCII expectations, not results observed in PlanMaker.
| Cell | Enter exactly in column A | Formula in column B | Expected code | Why |
|---|---|---|---|---|
| A2 | Arthur |
=CODE(A2) |
65 | A is the first character. |
| A3 | alpha |
=CODE(A3) |
97 | Lowercase a has a different code from uppercase A. |
| A4 | ␠Zone (type one real leading space, then Zone) |
=CODE(A4) |
32 | The leading space is the first character. |
| A5 | !Alert |
=CODE(A5) |
33 | Exclamation mark is first. |
| A6 | 0Start |
=CODE(A6) |
48 | Leading digit 0 is a text character. |
| A7 | CA-19 |
=CODE(A7) |
67 | Only C is examined, not the full code. |
Here ␠ in the description means a real U+0020 space you must type; do not paste the visible ␠ symbol into A4. If you do, this exercise will not test the intended leading space.
How to reproduce and check
- In A2 type
Arthur, in B2 type=CODE(A2). Expected: 65, as also stated in the SoftMaker manual. [S1] - Put
alphain A3; B3 should show the expected 97, independently mapped from lowercase a. - Enter a literal leading space before
Zonein A4. B4 should show 32, indicating a hidden leading space. - Fill the remaining rows; compare expected codes and investigate differences by inspecting the first stored character, not the formatted display.
- For an explicitly empty text expression, in D2 enter
=CODE(""): expected 0, because SoftMaker explicitly documents this case. This is a documentation-checked expected result, not an observed cell result. [S1]
Advanced examples and problem-solving
1. Differentiate blank text from one space
| Formula | Expected result | What it means |
|---|---|---|
=CODE("") |
0 | Empty string example from PlanMaker’s official manual. [S1] |
=CODE(" ") |
32 | String containing one actual space. [S1] |
=CODE("!") |
33 | Punctuation. [S1] |
=CODE("A") |
65 | Uppercase A. [S1] |
An actual empty worksheet cell, an empty string returned by a formula, and a literal "" argument can be subtly different in spreadsheets. The official entry specifically documents the literal CODE("") example; do not extrapolate all empty-cell coercion or import cases without tests.
2. Detect a leading ASCII space in an imported identifier
=CODE(A4)=32
Expected: TRUE if A4 really begins with the regular ASCII space U+0020 and supports the documented CODE behavior; FALSE for a normal leading letter. This checks only the first character and only code 32, not tabs, nonbreaking spaces or other whitespace.
3. Reverse a common character code
=CODE(CHAR(123))
Expected: 123, and this exact example is in the 2026 manual. You can also use =CHAR(CODE("X")) to get X. These are examples with ASCII-range values, not claims that all Unicode characters round-trip through ANSI. [S1, S5]
4. Inspect a later character explicitly
=CODE(MID("AB-19",3,1))
5. Case-sensitive identifier diagnostics
=CODE("A")=CODE("a")
Troubleshooting and limits
| Symptom | Explanation / investigation | Status |
|---|---|---|
| Leading space undetected visually | A3/A4 may look aligned but leading character code 32 proves a normal space in the text. | Independent expected example; native execution has not been verified. |
Text such as Arthur returns one number |
CODE checks the first character only, not an entire string or checksum. | Explicitly documented. [S1] |
=CODE("") shows 0 in the guide |
This is explicitly documented by PlanMaker, not a conjectured error. | Documentation check; native execution has not been verified. [S1–S3] |
| Excel returns a different result for an empty string | Do not infer Excel empty-argument behavior from this PlanMaker entry; independently test the target Excel version. | Microsoft source verifies first-character purpose but does not establish empty-string parity. [S4] |
| Non-ASCII characters yield unexpected code values | ANSI depends on character encoding/platform conventions; avoid hardcoding extended-code assumptions. | Platform-specific cases not native-tested. [S1, S4] |
| Different value after paste/import | Check the first stored character, invisible spaces, text-versus-number conversion and source encoding. | Diagnostic recommendations, not guaranteed PlanMaker parser semantics. |
| Error from a non-text, malformed, or unusual argument | Replace it with a literal text example (=CODE("A")), then test coercion separately. |
Exact PlanMaker error markers not established by the cited entry. |
Version, locale and cross-spreadsheet compatibility
- PlanMaker 2026/NX: The English manual, printed pp. 565–566, documents the first-character semantics and
CODE("A"),CODE("Arthur"),CODE(" "),CODE("!"),CODE("")andCODE(CHAR(123))examples. [S1] - PlanMaker 2024 and 2021: The same function name and core syntax are documented, including
CODE("") → 0, in their respective English manuals (2024 pp. 560–561; 2021 p. 529). These citations establish documentation existence, not first-availability dates in PlanMaker. [S2, S3] - Microsoft Excel: Microsoft describes CODE as returning the numeric code of the first character; it also distinguishes Windows ANSI from Macintosh mappings in its reference. Do not assume exact
CODE("")behavior or extended-character mappings match PlanMaker without testing a specific Excel version. [S4] - Unicode: SoftMaker separately documents
UNICODEandUNICHAR;CODEis identified as an ANSI-based first-character function. Do not substitute these functions blindly for non-ASCII text. [S1] - Locale and edition: English function spelling and one required argument are documented; actual UI translations, imported file encodings, Windows/macOS/Linux mapping subtleties and mobile-edition behavior were not executed.
Official reference and verification
Verification status: Official documentation checked; example outcomes were independently reasoned or arithmetically checked where applicable. Not executed in SoftMaker PlanMaker.
- No genuine SoftMaker PlanMaker screenshots are included; this guide does not use mock application images.