Google Sheets RIGHT function

Returns the last characters of a text. In Spanish Sheets it is called DERECHA.

Syntax

English Sheets

=RIGHT(string, [number_of_characters])

Spanish Sheets (Mexico locale)

=DERECHA(cadena, [número_de_caracteres])

Spanish Sheets (Spain, Latin America)

=DERECHA(cadena; [número_de_caracteres])

ArgumentWhat it is
stringThe text or cell.
number_of_charactersoptionalHow many characters to take; 1 by default.

Example

LEFT(text, n) takes the first n characters and RIGHT(text, n) the last ones. They split codes whose parts have a fixed length.

=RIGHT(A2,4)

Common mistake

Trailing spaces count as characters; clean them with TRIM first.

About Ads

This site uses Google AdSense to display ads. These ads help us keep WebHerramientas completely free. Ads are managed by Google and meet strict security and privacy standards.

Advertising
Loading ad...

Ads help us keep WebHerramientas free for everyone

Practice RIGHT

Type the formula in the sheet and check it instantly. Spanish or English function names both work. See all lessons

LEFT and RIGHT

LEFT(text, n) takes the first n characters and RIGHT(text, n) the last ones. They split codes whose parts have a fixed length.

Step 1/2

In B2, extract the 3-letter state code at the start of the reference.

B2
ABCD
1ReferenceStateNumber
2JAL-2026-0457
3CDM-2026-1203
4NLE-2026-0089
5YUC-2026-0731
6PUE-2026-0015
7

Tip: while typing, click a cell or drag across several to insert their reference.

Frequently asked questions

What is RIGHT called in Spanish?
In Spanish Google Sheets it is DERECHA. The formula =RIGHT(A2,4) is written =DERECHA(A2;4) (or with commas under a Mexico locale).
Why does RIGHT use semicolons in some spreadsheets?
It depends on each spreadsheet's locale, under File > Settings. Where the comma is the decimal mark (Spain, much of South America), arguments are separated by semicolons. Mexico and United States locales use commas.
What is the most common RIGHT mistake?
Trailing spaces count as characters; clean them with TRIM first.