How to Use the RIGHT, RIGHTBs Function in Excel
Today, we will delve into the RIGHT function, available in both Excel and Google Sheets. This function is particularly useful for extracting a specified number of characters from the right end of a text string.
Basic Syntax
The syntax for the RIGHT function is consistent across both Excel and Google Sheets:
=RIGHT(text, [num_chars])
text
refers to the text string from which you want to extract characters.num_chars
specifies the number of characters to extract from the text’s right side. This parameter is optional; if not provided, it defaults to 1.
Examples of Usage
Here are several examples to illustrate how the RIGHT function can be applied:
Example 1:
Extract the last 3 characters from the text string “Excel”:
Input | Formula | Output |
---|---|---|
Excel | =RIGHT(“Excel”, 3) | cel |
Example 2:
If the num_chars
parameter is omitted, the function defaults to extracting only the last character:
Input | Formula | Output |
---|---|---|
=RIGHT(“Google”) | e |
Example 3:
Apply the RIGHT function using cell references:
Input (A1) | Formula (B1) | Output (B1) |
---|---|---|
Excel | =RIGHT(A1, 2) | el |
These examples demonstrate the flexibility and practicality of the RIGHT function in Excel and Google Sheets. By adjusting the num_chars
parameter, you can tailor the number of characters extracted from the end of any text string.
More information: https://support.microsoft.com/en-us/office/right-rightb-functions-240267ee-9afa-4639-a02b-f19e1786cf2f