RIGHT
The RIGHT function in Google Sheets is a useful tool to extract a substring from the end of a specified string. Whether you need to extract the last few characters of a text, parse data from a URL, or manipulate string data in any other way, the RIGHT function can provide the solution. Explore our comprehensive guide to gain mastery over its application.
Function Syntax and Parameters
Syntax: RIGHT(string, [number_of_characters])
Parameters:
string: The string from which you want to extract the substring.number_of_characters: [Optional] The number of characters to extract from the end of the string. If not specified, the default value is 1.
Step-by-Step Tutorial
-
Using
RIGHTwith a specified string:- Example:
=RIGHT("Hello World", 5) - Result:
World
- Example:
-
Using
RIGHTwith a cell reference:- Example: If cell
A1contains the stringwww.example.com, then=RIGHT(A1, 4)will return.com.
- Example: If cell
Use Cases and Scenarios
- URL Parsing: Extract file extensions from URLs.
- Data Manipulation: Retrieve the last few characters from a text string.
- Text Formatting: Modify the formatting of the last few characters in a cell.
Related Functions
LEFT: Extract a substring from the start of a specified string.MID: Extract a substring from the middle of a specified string.LEN: Get the length of a string.