RIGHT Function
RIGHT extracts a specified number of characters from the right side of a text string.
Syntax
Parameters
| Parameter | Description | Required |
|---|---|---|
| text | The text string from which to extract characters. | Required |
| num_chars | Optional. The number of characters to extract (default is 1). | Optional |
Basic Example
Extract last 4 characters
=RIGHT("Hello World", 4)Extracts the last 4 characters from "Hello World".
Advanced Examples
Example 1: Extract file extension
File managementGet the extension from a filename
=RIGHT(A1, LEN(A1)-FIND(".", A1))Example 2: Extract last name
Name parsingGet the last name from "First Last" format
=RIGHT(A1, LEN(A1)-FIND(" ", A1))How RIGHT Works
RIGHT counts from the end of the text string and returns the specified number of characters. If num_chars is omitted, it returns just the last character.
Important Notes & Limitations
RIGHT counts each character as 1, including spaces.
Use LEFT to extract from the beginning, or MID to extract from the middle.
Common Errors & Fixes
#VALUE!num_chars is negativeFix: Ensure num_chars is a positive number.
Download Practice File
RIGHT
rightPractice RIGHT with Real Data
Download a sample CSV file with pre-populated data and practice exercises for the RIGHT function. Works in both Excel and Google Sheets.
File format: CSV (comma-separated values) - opens in Excel, Google Sheets, and all spreadsheet apps