Contact

RIGHT in Calligra Sheets: Extract Region and Item Suffixes

Text Beginner Calligra Sheets

Use Calligra Sheets RIGHT for fixed-length suffixes and region codes, with reproducible formulas and error guidance.

Verification status: Official documentation referenced; example outcomes independently reasoned or arithmetically checked where stated. Not executed in Calligra Sheets. How formula examples are checked

Quick answer and purpose

RIGHT returns the last specified characters from a string. =RIGHT("INV-2026-CAD";3) has an expected result of CAD. This is useful when product or invoice identifiers consistently end with a three-letter currency, location or product-type code. The calculation extracts characters; it does not inspect the structure or meaning of the identifier.

Verified syntax, arguments, and defaults

=RIGHT(text;length)
=RIGHT(text)

text (required) is source text or a cell reference. length (optional) is a whole-number count, shown as an integer in the release’s text.xml. In the pinned C++ implementation, omitted length defaults to 1, a count of 0 yields the empty string, a count larger than the string returns the full text, and a negative count returns #VALUE!. The KDE handbook explicitly demonstrates the omitted-count case RIGHT("KSpread") → d. Error codes for invalid text types or fractional inputs have not been tested and must not be inferred from Excel.

These formula examples use the English handbook’s semicolon (;) parameter separator. Other languages or locales may expose different separators or regional settings. The official catalogue plus the 26.08.2 source support this function’s registration; neither establishes tested results on an installed package.

Reproducible worksheet: six suffix extractions

In a new sheet put Code into A1, Suffix length into B1 and Result into C1. Type the rows below in A2:B7, then enter =RIGHT(A2;B2) in C2 and fill down through C7. Preserve the hyphens when typing the codes.

Row A — Code (text) B — Length C — Formula Expected C
2 INV-2026-CAD 3 =RIGHT(A2;B2) CAD
3 ORDER-USD 3 =RIGHT(A3;B3) USD
4 SKU-A12 3 =RIGHT(A4;B4) A12
5 CARD-FOIL 4 =RIGHT(A5;B5) FOIL
6 A 3 =RIGHT(A6;B6) A
7 DVD-BC 2 =RIGHT(A7;B7) BC

Expected only: the table was checked independently using Python string suffix operations for ASCII input. No Calligra workbook was opened and these results are not screenshots or native observations. Row 6 shows how a request longer than the source returns its full contents.

Advanced application: review currency-coded records

Suppose A2 is INV-2026-CAD. Classify it with the existing IF function:

=IF(RIGHT(A2;3)="CAD";"Domestic review";"Other currency")

Expected: Domestic review. If A3 is ORDER-USD, the same formula referencing A3 has expected Other currency. This is a classification of text suffixes, not validation that an invoice amount is denominated in the claimed currency. Verify the source record before acting on financial data.

For a two-character province suffix as in DVD-BC, use =RIGHT(A7;2); the expected result is BC. If suffix widths are mixed (CAD, BC, FOIL), never hard-code one length for every row without checking the underlying format.

Troubleshooting, negative lengths and text risks

  • Only the last character appears: a missing second argument defaults to 1. Specify ;2, ;3, etc., for longer suffixes.
  • #VALUE! for a negative count: the pinned source explicitly checks length < 0 and returns this error. Recheck computed lengths.
  • Result equals the entire string: the requested count exceeds the source length; that is documented, not necessarily a malfunction.
  • Confusing characters with separators: RIGHT(A2;3) works for a fixed three-character currency suffix. It does not search for the last hyphen or detect variable-length words.
  • Unexpected numeric formatting: invoice codes and strings containing leading zeros should be stored as text. Inspect the underlying value before assuming text extraction preserved a visually formatted number.
  • RIGHTB alias and Unicode: KDE’s help describes RIGHTB using byte positions; however, the pinned C++ registry sets RIGHTB as an alternate name for func_right, which uses QString::right. This documentation/registration discrepancy needs native multilingual tests. Do not promise distinct byte semantics or generate a separate redundant RIGHTB page merely from its handbook heading.
  • Locale or formula parse error: verify the leading =, quote placement, semicolon choice and function assistant before concluding the app calculated incorrectly.

Compatibility with Excel, LibreOffice, and Google Sheets

Excel documents RIGHT(text,[num_chars]), the same conceptual two-argument operation and default count 1; its English examples normally use a comma between arguments. These ASCII suffix examples are independently expected to match Excel’s documented behaviour. Microsoft’s Unicode and RIGHTB notes describe Excel-specific compatibility, not verified Calligra behaviour. No Calc, Sheets, Excel, XLSX or ODS import/export execution was performed; assess real workbook interoperability separately.

Official reference and verification

Verification status: Official documentation checked; example outcomes were independently reasoned or arithmetically checked where applicable. Not executed in Calligra Sheets.

  • No genuine Calligra Sheets screenshots are included; this guide does not use mock application images.