RIGHT Function

RIGHT Function

RIGHT Function

Extracts a chosen number of characters from the end of a text string.

ExcelClash Team
PUBLISHED

Summary

The Excel RIGHT function returns characters from the end of a text string. It is the opposite of LEFT, which starts from the beginning. For example, =RIGHT("report.xlsx",4) returns "xlsx".

RIGHT is useful when the part you need is always at the end of the value. Common examples are suffixes, file extensions, and the last digits of a code or phone number.

Purpose

Extract text from the end

Returns the last part of a text string based on the number of characters you request.

Return Value

A text string

Returns the extracted ending text. If you ask for too many characters, Excel returns the whole string.

Syntax

=RIGHT(text, [num_chars])

text is the source value. num_chars is how many characters to return from the end. If you omit num_chars, Excel uses 1.

Arguments

  • text - [Required] The text string or cell reference to extract from.
  • num_chars - [Optional] The number of characters to return from the end. The default is 1.

RIGHT vs Other Functions

RIGHT, LEFT, and MID all extract text, but they start from different places. RIGHT is the best choice when the needed part is at the end.

Function Starts From Use When
RIGHT The last character The needed text is at the end
LEFT The first character The needed text is at the beginning
MID A chosen position The needed text is in the middle
FIND / SEARCH - You need to calculate how much text comes after a delimiter

Using RIGHT

RIGHT is simple when the suffix length is fixed. A formula like =RIGHT(A1,3) can return the final three characters from every row in a code column.

When the ending part can be different lengths, RIGHT is often combined with LEN and FIND. For example, =RIGHT(A1,LEN(A1)-FIND(".",A1)) returns everything after the dot in a filename.

  • Use RIGHT when the text you need is always at the end.
  • Use RIGHT with LEN and FIND when the suffix length is not fixed.
  • Trim messy imported data first if trailing spaces might affect the result.

Example 1 - Extracting the Last Characters

This is the direct use of RIGHT. Excel counts backward from the end of the string and returns the requested number of characters.

=RIGHT("ExcelClash", 5) // "Clash"
=RIGHT("ENG-2026", 4)   // "2026"
=RIGHT("MTL-001-A", 1)  // "A"
Check Answer
Challenge #1
Target: Sheet1!F1
Get the Last 5 Characters

In cell F1, use RIGHT to extract the last 5 characters from "ExcelClash". Expected result: "Clash".

Example 2 - Extracting a Serial Number Suffix

If the code always ends with the same kind of suffix, RIGHT can return it directly. This is common with serial numbers, revisions, and short numeric endings.

=RIGHT(A1, 3) // "MTL-999" -> "999"
Check Answer
Challenge #2
Target: Sheet1!F2
Extract a Serial Suffix

In cell F2, use RIGHT on A1 ("MTL-999") to get the last 3 characters. Expected result: "999".

Example 3 - Getting the Last Digits of a Phone Number

RIGHT is often used to return the last few digits of a phone number, especially when building masked displays or helper columns for grouping.

=RIGHT(B2, 4) // "555-1234" -> "1234"
Check Answer
Challenge #3
Target: Sheet1!F3
Get the Last 4 Digits of a Phone Number

In cell F3, use RIGHT on B2 ("555-1234") to extract the last 4 characters. Expected result: "1234".

Example 4 - Extracting a File Extension Dynamically

If the extension length can change, RIGHT alone is not enough. LEN gives the total length, FIND gives the position of the dot, and the difference tells RIGHT how many characters to return.

=RIGHT(C1, LEN(C1)-FIND(".",C1))
// "data.xlsx" -> "xlsx"
// "report.csv" -> "csv"
Check Answer
Challenge #4
Target: Sheet1!F4
Extract a File Extension Dynamically

In cell F4, use FIND and RIGHT together to extract everything after the last dot in C1 ("data.xlsx").

RIGHT returns text, even when the extracted part looks numeric. If you need to use the result in a calculation, you may need to convert it afterward.

Conclusion Recap

  • Summary: RIGHT returns characters from the end of a text string.
  • Syntax: =RIGHT(text, [num_chars]).
  • Key point: RIGHT is best when the needed text is at the end.
  • Practical usage: Extensions, suffixes, revisions, and final digits.
  • Best pattern: Use RIGHT with LEN and FIND when the ending part is not a fixed length.
Tactical Arena
Select Scenario:
Share RIGHT Function!

Tell your friends about this post

Discussion

ExcelClash is an interactive platform designed to level up your Excel skills through real-world exercises and challenges. Sharpen your logic, solve real spreadsheet problems, and learn faster.

© 2026 ExcelClash, Inc. All rights reserved.