Ravindra BagaleCourses & study guides Track your progress

Excel RIGHT Function

Chala mitrano — rIGHT cuts from the end. Last 4 of a phone, last 3 of an order ID.

Fictional sample data for learning. Order IDs and file names (Surat textile + Manchester PDF exports). Mixed ₹ and £.

Purpose

Return the last (rightmost) characters from a text string — last 4 of an ID, a file extension, or masked card digits.

Return value

Text taken from the end of the original string.

Syntax

RIGHT(text, [num_chars])

Arguments

ArgumentRequired?Description
textRequiredThe full text or cell reference.
num_charsOptionalHow many characters from the right. Default 1.

Version

All Excel versions. LibreOffice Calc compatible.

How to use — Why → What → How

Why: A Surat export stores ORD-2026-8841 style IDs. Finance in Manchester only wants the last 4 digits for a short voucher column. Retyping is slow and error-prone. Last-four patterns show up in support scripts and voucher keys. Pair RIGHT with LEN checks so mixed-length IDs do not silently slice the wrong tail. Prefer TEXTAFTER when a delimiter is reliable.

What: RIGHT returns N characters from the end as text. Like LEFT, the original cell stays unchanged. Read every argument in the table once before you type; each one changes the answer on purpose.

How — numbered steps:

  1. Select the result cell.
  2. Type =RIGHT(
  3. Click the source text cell.
  4. Comma, then how many characters from the end.
  5. Press Enter and fill down.
  6. Spot-check rows where source length varies.
  7. TRIM first when CSV imports leave trailing spaces.
  8. For extensions, confirm length or locate the last dot.

Ravindra Bagale's Tip

Friends, mixed .xlsx and .csv need a last-dot approach — blind RIGHT(A2,3) fails on .xlsx.

Ravindra Bagale's Tip

Friends, sleep on RIGHT and rebuild example 1 tomorrow without looking. That five-minute test beats rereading the whole page.

Ravindra Bagale's Tip

Friends, after you finish RIGHT, open yesterday’s real workbook and find one place this function would have saved ten minutes. That habit turns lessons into salary skills.

Download practice file: practice-right.xlsx (includes sheet About this data, practice sheets, and Answers).

Worked examples

1) Last 4 of order ID

Surat orders.

Order IDAmount (₹)
ORD-2026-884112500
ORD-2026-88429800
ORD-2026-900115200
Formula: =RIGHT(A2, 4)

Result: 8841

What it means: Short voucher key 8841.

2) File extension letters

Manchester export list.

File
sales-jan.pdf
sales-feb.pdf
summary.pdf
Formula: =RIGHT(A2, 3)

Result: pdf

What it means: Extension letters without the dot.

3) Default one character

Grade at the end.

Code
MATH-A
SCI-B
Formula: =RIGHT(A2)

Result: A

What it means: Last character only.

4) Masked card last4

Support desk.

Masked
**** **** **** 4219
**** **** **** 1002
Formula: =RIGHT(A2, 4)

Result: 4219

What it means: Customer confirmation digits.

5) With TRIM

Trailing spaces from CSV.

Raw
8841
9001
Formula: =RIGHT(TRIM(A2), 4)

Result: 8841

What it means: Spaces removed before counting.

6) Dot plus extension

Keep the dot.

File
q1.xlsx
q2.xlsx
Formula: =RIGHT(A2, 5)

Result: .xlsx

What it means: Five characters from the end include the dot.

About this data. Small demo rows for learning. Real sheets are longer; the same formula pattern scales when columns are clean.

Common errors and fixes

#VALUE! — Negative num_chars. Fix: Use 0 or a positive number.
Wrong slice — Trailing spaces. Fix: TRIM the text first.
Mixed extension lengths — Blind RIGHT(A2,3) on .xlsx. Fix: Find the last dot, or use TEXTAFTER.

Notes and tips

  • RIGHT returns text.
  • Combine with VALUE when the tail is a pure number you must calculate with.
  • TEXTAFTER is cleaner when a delimiter marks the start of the tail.
  • Call centres in Pune and billing teams in Leeds both ask for last-4 patterns. Teach RIGHT beside LEFT so students see the symmetry. Stress TRIM on CSV imports every time.
  • RIGHT vs TEXTAFTER: TEXTAFTER splits on a delimiter without counting characters. RIGHT vs MID: MID needs a start position counted from the left.
  • Fictional sample data only — practice amounts and names are made for learning.
  • After the 10 tasks, re-read the errors table once.
  • Say the business question in plain words before you type equals.
  • Keep a scrap sheet for experiments so you do not overwrite class files.
  • Fill formulas down only after the first row looks correct.
  • When two answers look possible, write both on paper then test in Excel.
  • Last-four patterns show up in support scripts and voucher keys. Pair RIGHT with LEN checks so mixed-length IDs do not silently slice the wrong tail. Prefer TEXTAFTER when a delimiter is reliable.
  • Revisit the RIGHT errors table after the quiz — most classroom mistakes are listed there.
  • Build one brand-new example on a blank sheet from memory before you close the laptop.
  • If a result looks wrong, check spaces with LEN and case with exact equals before changing the formula.
  • Share one tip from this page with a classmate in Marathi or Hindi — teaching locks the idea.
  • Keep currency symbols consistent inside a single report column even when practice mixes ₹ $ £ € across examples.
  • When Excel versions differ at home and in class, write the fallback formula under the modern one in a comment cell.
  • Print the revision card for RIGHT and stick it near your monitor for one week of real worksheets.
  • When helping a junior, ask them to predict the result before pressing Enter — prediction builds judgement.
  • Keep a personal notebook of the one mistake you make most often with this function; review it monthly.

In real work

Call centres in Pune and billing teams in Leeds both ask for last-4 patterns. Teach RIGHT beside LEFT so students see the symmetry. Stress TRIM on CSV imports every time. Last-four patterns show up in support scripts and voucher keys. Pair RIGHT with LEN checks so mixed-length IDs do not silently slice the wrong tail. Prefer TEXTAFTER when a delimiter is reliable. Classroom drill: write three brand-new RIGHT formulas on a blank sheet using names from your own city — if you can invent them without the page open, you own the skill. Then break one formula on purpose (wrong case, wrong start, extra space) and watch the error; recovering from that break is half of interview readiness.

How it compares

RIGHT vs TEXTAFTER: TEXTAFTER splits on a delimiter without counting characters. RIGHT vs MID: MID needs a start position counted from the left.

Interview corner

Does RIGHT return a number?
No — text. Use VALUE if needed.
How do you get characters after the last dash?
TEXTAFTER with instance -1, or RIGHT with a calculated length.
What is the default num_chars?
1.

LEFT, MID, TEXTAFTER, LEN

Practice tasks (10)

  1. Task 1. Return last 4 of ORD-2026-8841 in B2.
    Hint: count from the right edge.
  2. Task 2. Fill down for three Surat orders.
    Hint: relative references.
  3. Task 3. Get pdf from sales-jan.pdf.
    Hint: three letters.
  4. Task 4. Default RIGHT on MATH-A.
    Hint: omit the second argument.
  5. Task 5. Last 4 from a masked card string.
    Hint: spaces inside the mask count as characters.
  6. Task 6. TRIM then RIGHT 4 on a messy cell.
    Hint: nest TRIM.
  7. Task 7. Return .xlsx including the dot.
    Hint: five characters.
  8. Task 8. Note whether RIGHT result is text or number.
    Hint: try VALUE around it.
  9. Task 9. Build a last-3 helper for each Order ID.
    Hint: change the count only.
  10. Task 10. Write one sentence on when TEXTAFTER beats RIGHT.
    Hint: think delimiter.

Quick quiz

Q1. RIGHT("ORD-2026-8841",4) returns:
Q2. RIGHT returns:
Q3. Default num_chars:
Q4. Trailing spaces are cleaned with:
Q5. For mixed .pdf and .xlsx extensions prefer:

Answers: Q1=8841, Q2=Text, Q3=1, Q4=TRIM, Q5=Last-dot logic or TEXTAFTER (check after you try).

Revision card

Standalone card (no tip or photo strip). QR opens this lesson. Download the PNG and revise offline.

Revision card: RIGHT
RIGHT revision card