I want to display only the first four characters from the right of the data entered in a cell, or I want to display the remaining portion of the data without displaying the left few characters.
Conversely, I want to display only the first four characters from the left of the data entered in a cell, or the remaining portion of the data without displaying the few characters on the right.
In such cases, the RIGHT or LEFT functions are useful. This article will show you how to use the RIGHT and LEFT functions.
RIGHT function
This function is used when you want to display only the number of characters from the right. If you want to display only the characters to the right of a specific character, or if the number of characters varies, please refer to this article.
How to write the RIGHT function
- =RIGHT(string,number of characters)
Put the string containing the characters you want to extract into the "String" item.
Put the number of characters to be taken out from the right into the "number of characters" field.
For example, if you want to extract the last 4 digits of a phone number
=RIGHT("090-1234-4561",4)
the result will be "4561".
Next, let's look at a form that references a string entered in another cell, rather than entering the string directly in the function.
For example, let's display the last four digits of the string entered in cell A1 in the adjacent B1.
Enter B1 as follows
=RIGHT(A1,4)
Then B1 will show the following.

Then, with the cell with the function selected, drag the lower right portion down to the bottom.

Then column B shows all the last 4 digits of the phone number in column A.

LEFT function
This function is used when you want to display only the number of characters from the left. If you want to display only the characters to the left of a specific character, or if the number of characters varies, please refer to this article.
How to write the LEFT function
- =LEFT(string,number of characters)
Put the string containing the characters you want to extract into the "String" item.
Put the number of characters to be taken out from the left into the "number of characters" field.
For example, if you want to extract the first three digits of a phone number
=LEFT("090-1234-4561",3)
the result will be "090".
Next, let's look at a form that references a string entered in another cell, rather than entering the string directly in the function.
For example, let's display the first three digits of a string entered in cell A1 in the adjacent B1.
Enter B1 as follows
=LEFT(A1,3)
Then B1 will show the following.

Then, with the cell with the function selected, drag the lower right portion down to the bottom.

Then column B shows all the first three digits of the phone number in column A.

Comment