Google Sheets RIGHT function
Returns a number of characters from the end of a piece of text.
Syntax
=RIGHT(string, [number_of_characters])
string | The text to take characters from. |
|---|---|
number_of_characters | Optional. How many characters to return (default 1). |
Try it
Edit the formula and the result updates instantly. Click a cell to add its reference.
Customer import
Result: A
| A | B | C | |
|---|---|---|---|
| 1 | Name (raw) | Order code | City |
| 2 | jane DOE | NY-2041-A | New York |
| 3 | MARK smith | CA-1187-B | Fresno |
| 4 | ana lopez | TX-3302-C | Austin |
| 5 | li wei | WA-0459-A | Seattle |
| 6 | OMAR farouk | FL-7720-B | Tampa |
| 7 | sara KIM | NY-5521-C | Buffalo |
Examples
These use the sample sheet above.
→ A
The class letter at the end of the code.
→ sno
The last three letters of the city.
Tips & common mistakes
- Combine with LEN to drop a fixed prefix: =RIGHT(B2, LEN(B2)-3) removes the first 3 characters.