Excel RIGHT Function

RIGHT Function

Learn how to use the RIGHT function in Excel with Inside Excel’s step-by-step guide, examples, and best practices for text extraction.

Syntax

=RIGHT(text, [num_chars])

Description

The RIGHT function extracts a specified number of characters from the end (right side) of a text string. It is useful for retrieving suffixes, extracting the last few characters of an identifier, or separating text components.

Arguments

  • text: The text string from which to extract characters. This argument is required.
  • [num_chars] (optional): The number of characters to extract from the right side of the text. If omitted, the function defaults to 1.

Return Value

A text string containing the extracted characters from the right side of the input string.


How to Use the RIGHT Function

Basic Example: Extract the last three characters from the text in cell A1:

=RIGHT(A1, 3)

If A1 contains “Excel”, the result will be “cel”.

Extract the File Extension: If column A contains file names, use RIGHT to extract the file extension:

=RIGHT(A1, 3)

If A1 contains “document.xlsx”, the result will be “lsx”.

Retrieve Last Name: Use RIGHT with SEARCH to extract the last word from a full name:

=RIGHT(A1, LEN(A1) - SEARCH(" ", A1))

This assumes names are in “First Last” format.

Video Tutorial

Watch this video tutorial to see the RIGHT function in action and learn various use cases: [Embed video link here]


RIGHT Function Tips and Tricks

  • Use with Numbers Stored as Text: RIGHT extracts characters from numbers stored as text. To convert them to numbers, use VALUE: =VALUE(RIGHT(A1,3)).
  • Handling Errors: If using SEARCH within RIGHT, ensure the delimiter exists in the text to avoid errors.
  • Combine with MID or LEFT: To extract text from different parts of a string, use MID or LEFT alongside RIGHT.

Practice Problems

  • Problem 1: Extract the last 4 characters from a list of product codes in Values Column.