Syntax
| Parameter | Description |
|---|---|
| text | Parameter of the RIGHT function. |
| [num_chars] | (Optional.) Parameter of the RIGHT function. |
Examples
Extract file extension
=RIGHT(A2, 3)
Get last 4 digits of a phone number
=RIGHT(A2, 4)
Extract domain extension
=RIGHT(A2, LEN(A2)-FIND(".", A2))
Common Errors
The num_chars argument is negative. It must be zero or positive.
The cell contains a number, not text. Use TEXT() to convert first: =RIGHT(TEXT(A1, "0000"), 2).
Tips
=RIGHT(A1, LEN(A1)-FIND(" ", A1)) gets everything after the first space in "John Smith".
If a cell shows 00542, RIGHT(A1,3) returns "542". Make sure the cell is formatted as text to preserve leading zeros.
=RIGHT(A1, 1) gives just the last character — useful for checking suffixes or trailing characters.
Try RIGHT in Viztab
Import your data and use RIGHT with 370+ other formulas. No signup required.
Open Viztab