Formualizer Docs

RIGHT

Returns the rightmost characters from a text value.

The Formualizer engine in this repository at 0.15.0 plus unreleased changes computes the example results. Known differences from Excel are listed on this page.

Syntax

=RIGHT(text, [num_chars])

Arguments

ArgumentTypeRequiredDefault
textanyRequired—
num_charsanyOptional—

Return type

Can return text.

Remarks

  • num_chars defaults to 1 when omitted.
  • If num_chars exceeds length, the full text is returned.
  • Non-text values are coerced to text before slicing.

Error cases

  • Negative num_chars returns #VALUE!.

Examples

Extract four ASCII characters from the selected end of a label.

Formula =RIGHT("East-2024",4)

Expected result 2024

Try this formula

This editor runs the published Formualizer 0.14.0 package, so the last digits can differ and functions newer than that release return #NAME?.

Omit the count and use the default of one.

Formula =RIGHT("East-2024")

Expected result 4

Try this formula

This editor runs the published Formualizer 0.14.0 package, so the last digits can differ and functions newer than that release return #NAME?.

A count of zero yields empty text.

Formula =RIGHT("East-2024",0)

Expected result ""

Try this formula

This editor runs the published Formualizer 0.14.0 package, so the last digits can differ and functions newer than that release return #NAME?.

A negative extraction count is invalid.

Formula =RIGHT("East-2024",-1)

Expected result #VALUE!

Try this formula

This editor runs the published Formualizer 0.14.0 package, so the last digits can differ and functions newer than that release return #NAME?.

Take last three characters

Formula =RIGHT("engine", 3)

Expected result ine

Try this formula

This editor runs the published Formualizer 0.14.0 package, so the last digits can differ and functions newer than that release return #NAME?.

Default count is one

Formula =RIGHT("abc")

Expected result c

Try this formula

This editor runs the published Formualizer 0.14.0 package, so the last digits can differ and functions newer than that release return #NAME?.

FAQ

If num_chars is larger than the text length, what is returned?

RIGHT returns the full text when the requested count exceeds available characters.

Implementation

Engine source

On this page