I. Intro
The RIGHT function returns the specified number of characters from the rightmost portion of a string.
II. About the function
- Formula: =RIGHT(string, [number_of_characters])
- Parameters:
- string: The string from which the characters on the right are returned.
- number_of_characters: The number of characters to be returned.
- Note: If the number of characters is 0, a length of zero (" ") will be returned. If it is greater than or equal to the total number of characters in the string, the whole string will be returned.
- Example:
- =RIGHT("123456",3) results in 456.
III. Steps
Use the RIGHT function
- Select a cell and enter =RIGHT.
- Enter the first parameter in the cell.
- Enter a comma, then the second parameter. For example, if you want the last 3 characters of the string, enter 3.
- Press Enter to display the result.
250px|700px|reset
Delete the RIGHT function
Select the cell with the RIGHT function, and press Delete.
IV. Use cases
Extract the last few digits of ID numbers
To publish private information without revealing someone's identity, using only the last few digits of their ID is a good option. Here, the RIGHT function can help you achieve that goal.
- In the figure below, the last 4 digits of the ID numbers are extracted using =RIGHT(A2,4).
250px|700px|reset