Excel RIGHT Function
RIGHT returns a chosen number of characters from the end of a text value.
Use it to extract suffixes, final ID digits, file extensions, or the last part of a code when the needed text sits at the right edge.
RIGHT syntax & arguments
Syntax
=RIGHT(text, [num_chars])
-
1
text
RequiredThe text value, cell reference, or formula result to extract characters from.
-
2
num_chars
OptionalThe number of characters to return from the right side of
text. If omitted, RIGHT returns one character.
Example
=RIGHT(A2, 3)
Return the last three characters from the text in A2.
RIGHT caveats
RIGHT is simple when the length is fixed, but it can produce misleading results when the source value is not clean text.
-
The count starts at the last character
num_charstells Excel how many characters to return from the right side, not where to begin. -
Omitting the length returns one character
If
num_charsis left out, RIGHT returns only the last character of the text. -
Negative lengths return an error
A negative
num_charsvalue causes a#VALUE!error. -
Dates and numbers may not behave like display text
RIGHT works on the underlying text representation, so formatted dates or numbers may need to be converted before extraction.
Need a variable length? Combine RIGHT with FIND when a delimiter marks where the extracted text should start.
Intro RIGHT practice problem
Solve the intro problem directly here, or open it on its own page.
Advanced RIGHT practice problems
Use RIGHT alongside other Excel functions in realistic, less-prescriptive challenges.