This page isn't translated yet, so its text is in English. Function names and formulas are shown in your Excel language.
Excel function · Finding text
RIGHT
Returns the last characters of a text.
What it does
RIGHT takes a number of characters from the end of a text, such as the last digits of a card or an extension.
Syntax
=RIGHT(text; [num_chars])Arguments in square brackets are optional, and … means you can add more of the same. In this Excel language, arguments are separated by ;
Arguments
- text
- The text to take characters from.
- num_chars
- How many characters to take. Leave it out to take just one.
Example
Receipts show only the end of a card number. What are its last four digits?
| A | B | |
|---|---|---|
| 1 | Card number | Last four |
| 2 | 4921 7730 5512 0386 | 0386 |
The formula in B2:
=RIGHT(A2;4)Result: 0386
The text ends in 0386, and those four characters are the result. The leading zero stays because the result is text.
Common mistakes
- Missing a trailing space. If the cell ends in a space, it counts as one of the characters.
- Using
RIGHTon a real number and expecting its leading zeros. A number stored as 0386 is 386.
In other Excel languages
Excel translates function names, and in some languages the argument separator too. Type the name your Excel shows.
| Excel language | Function name | Separator |
|---|---|---|
| English | RIGHT | , |
| Deutsch | RECHTS | ; |
| Français | DROITE | ; |
| Español (España) | DERECHA | ; |
| Español (México) | DERECHA | , |
| 日本語 | RIGHT | , |
| 한국어 | RIGHT | , |
| 繁體中文 | RIGHT | , |
| ไทย | RIGHT | , |
| ខ្មែរ | RIGHT | , |
| Tiếng Việt | RIGHT | ; |