Skip to content

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?

AB
1Card numberLast four
24921 7730 5512 03860386

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 RIGHT on 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 languageFunction nameSeparator
EnglishRIGHT,
DeutschRECHTS;
FrançaisDROITE;
Español (España)DERECHA;
Español (México)DERECHA,
日本語RIGHT,
한국어RIGHT,
繁體中文RIGHT,
ไทยRIGHT,
ខ្មែរRIGHT,
Tiếng ViệtRIGHT;

Practise it

More from this module

All functions