
Extracts a chosen number of characters from the end of a text string.
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.
RIGHT works best when the end of the value carries the meaning. That is common with file extensions, suffix codes, last digits, or short endings added to a larger label. If the cutoff point changes, RIGHT is often paired with LEN, FIND, or SEARCH so the correct ending can still be isolated cleanly.
Returns the last part of a text string based on the number of characters you request.
Returns the extracted ending text. If you ask for too many characters, Excel returns the whole string.
=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.
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 |
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.
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"
In cell B1, use RIGHT to extract the ending characters from the first row.
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"
In cell B2, use RIGHT on the serial code row.
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"
In cell B3, use RIGHT on the phone-number row.
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"
In cell B4, use RIGHT with other functions to extract a file extension.
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.
RIGHT is the simple choice when the part you want is always at the end. In this lesson, that showed up as suffixes, phone endings, and file extensions.
The main thing to remember is that RIGHT counts from the last character backward. If the ending length changes, pair it with LEN and FIND so the formula can work it out for you.
RIGHT returns characters from the end of a text string.=RIGHT(text, [num_chars]).Tell your friends about this post