Data Analytics Roadmap
Excel Basics → Text Functions → RIGHT Function Complete Masterclass
EXCEL TEXT EXTRACTION

Master the RIGHT Function

Extract ending suffixes, file extensions, location codes, and last 4 card digits directly from the end of any text cell in Excel!

⏱ ~15 Min Complete Masterclass👉 Suffix Extraction🎮 Interactive Slicer Simulator

1. What is the RIGHT Function & How Does It Work?

The RIGHT function extracts a specific number of characters starting from the far right (end) of a text string. It counts backward from the final character toward the beginning.

Formula Anatomy: The Parameters of RIGHT()

=RIGHT( text , [num_chars] )
1. TEXT (REQUIRED)

Which cell contains the text?

The text string or cell reference (e.g. A2) you want to extract from.

A2 = "SKU-9842-NYC"
2. NUM_CHARS (OPTIONAL)

How many characters from the end?

Number of characters to extract counting from right-to-left. Default is 1.

3 (Extracts "NYC")

2. Real-World Analytics Scenarios for RIGHT

🏢 Scenario A: Extracting Location / Branch Suffix

Isolate city codes from SKU strings like SKU-9842-NYC.

=RIGHT(A2, 3) ➔ "NYC"

💳 Scenario B: Card Last 4 Digits

Isolate the last 4 digits of account or card numbers for secure receipts.

=RIGHT(A2, 4) ➔ "4829"

📁 Scenario C: Dynamic File Extension Extraction

Combine RIGHT with LEN & SEARCH to grab file extensions after the dot (e.g. .pdf or .xlsx).

=RIGHT(A2, LEN(A2)-SEARCH(".", A2))

🎮 Live Interactive RIGHT Slicer Simulator

Type text and adjust the slider to see ending characters highlight in real-time!

🔍 Visual Character Extraction Highlight (Right to Left)

Extracting last 3 of 12 characters
1
S
2
K
3
U
4
-
5
9
6
8
7
4
8
2
9
-
10
N
11
Y
12
C
RIGHT FORMULA RESULT CELL:"NYC"
📊 Generated Excel Formula
=RIGHT(A2, 3)

🧪 Knowledge Check — RIGHT Function Quiz

Question 1 of 5Score: 0

👉 What does =RIGHT('REPORT2026.XLSX', 4) return?