Excel RIGHT Function (Characters From End) – Examples & Practice
Practice the Excel RIGHT function online with an interactive grid, instant feedback, and clear formula help.
Instruction
Extract the last 4 characters from text in A3.
Formula Syntax
=RIGHT(text, [num_chars])
- text: The text string that contains the characters you want to extract.
- [num_chars]: Optional number of characters from the end.
What it does
RIGHT returns the rightmost characters from a text string. It complements LEFT and MID for parsing workflows.
Excel RIGHT Function Examples
Last 4 characters
=RIGHT(A3, 4)
Useful for suffix codes or last-four IDs.
Last character (status flag)
=RIGHT(A3, 1)
When the final character encodes status (for example Y / N), a single character is enough.
Widen the slice for variable suffixes
=RIGHT(A3, 6)
Increase num_chars when suffix length drifts; pair with FIND/SUBSTITUTE when you need delimiter-based parsing instead of a fixed width.
text-cleanup.xlsx
| A | B | |
|---|---|---|
| 1 | Raw Text | Helper |
| 2 | ACME Corporation | ACME |
| 3 | Invoice-2026-0001 | 2026 |
| 4 | VIP_CLIENT | VIP |
| 5 | John Doe | Doe |
| 6 | Product Name | Product |
| 7 | Output |
Input Formula
Need Help?
Tips
- For variable tails, combine with FIND or TEXTAFTER in modern Excel.
- Keep a sample row visible when tuning num_chars.
- Document delimiter rules for teammates.
RIGHT Function Use Cases
- Extract file extensions or version suffixes
- Pull last digits from standardized strings
- Parse legacy codes with fixed tail segments
- Combine with LEFT/MID for full splits
- Generate keys for lookups from composite strings
Common mistakes - RIGHT function not working
- Using RIGHT for variable-length tails without FIND logic
- Off-by-one with inclusive counts
- Ignoring leading/trailing spaces in the source
- Expecting numeric output without VALUE
- Hard-coding num_chars when data length drifts
FAQ
RIGHT vs RIGHTB?
RIGHTB counts bytes; RIGHT counts characters.
Does RIGHT reverse text?
No. It extracts from the end while preserving order.
Can RIGHT extract file extensions?
Yes, when combined with FIND/SUBSTITUTE patterns.
What if num_chars is bigger than the string?
Excel returns the whole string in typical cases.
Does RIGHT trim spaces?
No. Use TRIM upstream.
Comparison
| Function | Direction |
|---|---|
| RIGHT | End of string |
| LEFT | Start of string |
| MID | Middle |
Example
=RIGHT("ABCDEF", 3) returns DEF.
Advanced examples
RIGHT with SUBSTITUTE
Remove known prefixes first, then take the RIGHT segment for cleaner parsing.