How to Use the RIGHT Function in Excel

The RIGHT function in Excel allows you to extract characters from the end (right side) of a text string. This is useful when you only need a specific portion of text, such as the last few digits of an account number, a file extension, product codes, or employee IDs.

In business environments, the RIGHT function is commonly used to clean data, separate codes, and pull meaningful information from long text strings without manually editing cells.

In This Guide, You’ll Learn

  • What the RIGHT function does in Excel
  • How to write the RIGHT formula correctly
  • How to extract text from the right side of a cell
  • Real-world business examples using RIGHT
  • Common mistakes to avoid
  • Practical ways to combine RIGHT with other functions

What is the RIGHT Function?

The RIGHT function extracts a specified number of characters from the end of a text string. You tell Excel how many characters you want, and Excel returns them starting from the far right.

RIGHT Function Syntax

Argument Definitions

  • text – The text string or cell reference you want to extract characters from.
  • num_chars – Optional. The number of characters you want Excel to return from the right side. If omitted, Excel returns 1 character.

Example Dataset Used in This Tutorial

You can download the sample data we’ll be using in this tutorial by clicking on this link—> RIGHT Function Data

Basic RIGHT Function

In this example, we will extract the last 3 characters from a product code.

Formulas Used

The formula tells Excel to return the last 3 characters from each text string.

Extracting the Last 4 Digits of an Account Number

Many companies only display the last four digits of sensitive account numbers.

Formulas Used

This is useful for reporting where you want to partially hide account information.

Extracting File Extensions

Businesses often work with exported reports and file types. RIGHT can identify the file extension.

Formulas Used

This can help sort or organize files automatically.

Extracting Department Codes from Employee IDs

Suppose employee IDs end with a department code.

Formulas Used

This is a practical way to separate embedded business information inside IDs.

Common RIGHT Function Mistakes

Requesting Too Many Characters

If you ask for more characters than exist in the text, Excel simply returns the entire text string.

Example:

Result: Excel

Forgetting num_chars

If you leave out the second argument, Excel only returns one character.

Example:

This returns only the final character.

Numbers Stored as Text

RIGHT treats everything as text, including numbers.

This is usually helpful, but it can occasionally cause issues if you expect a numeric result for calculations.

Example Dataset Used in This Tutorial

You can download the sample data we’ll be using in this tutorial by clicking on this link—> RIGHT Function Data

Related Articles

Leave a Reply

Your email address will not be published. Required fields are marked *