MS Excel: RIGHT, from Basics to Advanced Use
- Fakhriddinbek
- Apr 25
- 2 min read
The RIGHT function in Excel is the mirror of the LEFT function. It allows users to extract a specific number of characters from the end (right side) of a text string. This function is especially useful when dealing with fixed-format codes, dates, or trailing data.
Let’s walk through how to use it—from beginner to advanced level—complete with examples and practical tips.

Syntax:
RIGHT(text, [num_chars])
text – The original text string.
num_chars (optional) – The number of characters to extract from the right. If omitted, Excel returns just the last character.
Beginner Level: Basic Extraction
Example 1: Extracting Last Characters
A (Code) | B (Last 3 Characters) |
PRD12345 | =RIGHT(A2, 3) → "345" |
INV2023 | =RIGHT(A3, 4) → "2023" |
Useful for pulling codes, years, or IDs from the end of a string.
Intermediate Level: Extracting Text After a Dash
When working with codes or names that include delimiters like dashes (-), the RIGHT function can be paired with FIND, LEN, and MID for smarter results.
Example 2: Get the Text After a Hyphen
A (Data) | B (Extracted Right Part) |
US-NY | =RIGHT(A2, LEN(A2)-FIND("-", A2)) → "NY" |
UK-LON | =RIGHT(A3, LEN(A3)-FIND("-", A3)) → "LON" |
This extracts the part after the dash, regardless of length.
Advanced Level: Use with IFERROR and SEARCH
Use the RIGHT function with other formulas to extract data even when the structure isn’t always perfect.
Example 3: Get File Extension from File Name
A (File Name) | B (File Extension) |
report2024.xlsx | =RIGHT(A2, LEN(A2) - FIND(".", A2)) → "xlsx" |
resume.pdf | =RIGHT(A3, LEN(A3) - FIND(".", A3)) → "pdf" |
Add IFERROR for cleaner results if some rows don’t have extensions.
Real-Life Use Cases
Task | Formula Example |
Extract last 4 digits of a number | =RIGHT(A2, 4) |
Get last name from email address | =RIGHT(A2, LEN(A2)-FIND(".", A2)) |
Get code suffix | =RIGHT(A2, 2) (e.g., "XYZ01" → "01") |
Summary
Level | Key Feature | Example Formula |
Beginner | Extract fixed characters from the right | =RIGHT(A2, 4) |
Intermediate | Extract after symbol using FIND & LEN | =RIGHT(A2, LEN(A2)-FIND("-", A2)) |
Advanced | Combine with IFERROR or SEARCH | =IFERROR(RIGHT(...), "") |
The RIGHT function in Excel is a must-know tool for extracting data from the end of text strings. When combined with functions like FIND, LEN, and IFERROR, it becomes a powerful part of your data-cleaning toolbox. Whether you’re working with filenames, codes, or IDs, mastering RIGHT helps streamline your workflow and improves your efficiency.
Comments