Contact

RIGHT Function (OpenOffice Calc)

Text Intermediate OpenOffice Calc

Learn the RIGHT function in Apache OpenOffice Calc: Returns the last character or characters of a text.

Verification status: See the evidence and test scope described in this guide. How formula examples are checked

Availability and version history

  • Introduced: Documented by Apache OpenOffice 4.1.16; original introduction not established.
  • Availability: Supported in Apache OpenOffice 4.1.16, verified against its function registry. This identifies a supported release, not a final working version.
  • Scope: Desktop Calc, using the English function name. Availability in other spreadsheet applications is separate.
  • Checked: 2026-10-14 — function reference; versioned support. Documentation/source check; not a new native test. Existing example-specific test claims below retain their stated scope.

RIGHT extracts characters from the end of a text value. It is useful for fixed-length suffixes such as region codes or known extensions. The result remains text, including digit-only suffixes and leading zeros within the extracted portion.

Syntax and arguments

=RIGHT(text; count)
=RIGHT(text)

text is the source string or cell reference. Optional count defaults to 1 and specifies the number of characters to keep from the right. Supply a nonnegative integer. The inspected 4.1.16 interpreter rounds fractional counts downward, checks the internal string-length bound, and rejects invalid negative counts. The formulas use English function names and Calc’s semicolon argument separator.

Reproducible examples

Formula Expected text or number
=RIGHT("Spreadsheet";5) "sheet"
=RIGHT("INV-0042";4) "0042"
=RIGHT("INV-0042") "2"
=RIGHT("abc";0) ""
=RIGHT("abc";99) "abc"
=RIGHT("";2) ""

Here "" denotes zero-length text, not a displayed pair of quotation marks. The first example retains the original guide’s formula. Its comparable LibreOffice 25.2 result was not an OpenOffice test; the new examples are expected results derived from the documented operation and independently checked text mappings.

Practical worksheet: separate a fixed-width record suffix

Enter INV-0042, INV-0105 and CRN-0007 as text in A2:A4. In B2 enter =RIGHT(A2;4) and fill down. Expected results are the text strings 0042, 0105 and 0007. They are identifiers, so there is no reason to convert them to numbers.

If arithmetic on the suffix is genuinely required, put =VALUE(B2) in C2 and fill down to obtain 42, 105 and 7. Column C deliberately discards leading zeros. Keep column B or A as the authoritative identifier rather than overwriting it with the numerical conversion.

Advanced applications

Extract after a delimiter. With SALES-west in A2, =RIGHT(A2;LEN(A2)-FIND("-";A2)) returns west. With SALES-north-west, it returns north-west because FIND locates the first hyphen. This is not a formula for the text after the final delimiter.

Check a known extension. =RIGHT(A2;4) returns .csv for orders.csv. A three-letter extension plus its dot is four characters; other extension lengths need separate handling. =LOWER(RIGHT(A2;4)) can standardize ASCII extension case when that fits the requirement.

Errors, edge cases and troubleshooting

Trailing spaces are part of the suffix. RIGHT(“abc “;1) returns a space, not c. Apply TRIM only if removing ordinary surplus spaces is authorized by the data-cleaning rule; it can alter meaningful spacing.

The count is a maximum, not a padding width. An oversized ordinary count returns the whole string. The selected examples use ASCII and do not establish byte-encoding or visual-grapheme behavior for emoji and combining marks. RIGHT and RIGHTB are different functions; do not change one to the other merely because a file contains non-English text.

For a list of records, enter a scalar helper formula in the first result row and fill down. Check the absolute and relative references before copying. Do not assume that a single multi-cell argument automatically produces a modern spill range in OpenOffice Calc.

Documentation and verification

See the Apache OpenOffice RIGHT reference, 4.1.16 text-function help, and versioned interpreter. The source snapshots were originally retrieved on 2026-10-13 and re-read for this revision. Independent text calculations are not native application or GUI tests. Current support is version-scoped above; introduction and final functioning version remain unestablished.