<< Go back to all functions

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

  1. Using RIGHT with a specified string:

    • Example: =RIGHT("Hello World", 5)
    • Result: World
  2. Using RIGHT with a cell reference:

    • Example: If cell A1 contains the string www.example.com, then =RIGHT(A1, 4) will return .com.

Use Cases and Scenarios

  1. URL Parsing: Extract file extensions from URLs.
  2. Data Manipulation: Retrieve the last few characters from a text string.
  3. 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.

Related Articles