Do you know the structure and usage of the LEFT function in Excel?

This article guides you in detail about the structure and usage of common and effective LEFT function in Excel

What is the LEFT function in Excel used for? What is the structure and usage of this function?

Want to cut off a number of characters in any one cell and then apply it to other cells?You can use string truncation operations such asLEFT , RIGHT , MID.This article will introduce the syntax and usage of LEFT function in Excel.

1. The Left function structure in Excel

LEFT ( text, [numchars] )

Inside:

+ text- original character string

+ numchars- the number of characters you need to cut from the original character string from the left to

2. How to use the Left function in Excel

Suppose you have a cell B3 (yellow) with the year - month - day format written together. If you only need to extract the year from cell B3 , you can use the LEFT function by entering cell C3 (in orange) next to the structure: = LEFT (B3,4) , then press Enter . Then, cell C3 will show 2015 results as shown in the picture.

Do you know the structure and usage of the LEFT function in Excel? Picture 1Do you know the structure and usage of the LEFT function in Excel? Picture 1

Let's analyze the structure of this statement:

LEFT (B3,4) = LEFT ('20151219', 4) , meaning you will take 4 characters from the left to the right as in the picture:

Do you know the structure and usage of the LEFT function in Excel? Picture 2Do you know the structure and usage of the LEFT function in Excel? Picture 2

And the result you get is 2015 .

Similarly, if you want to get 5 characters from the left, you type the formula: LEFT (B3,6) and the result you get is 201512

3. Some notes when using the Left function in Excel

+ The number of characters you need to get must be greater than 0, meaning that if you enter the cell using the formula: = LEFT (B3, -1) , you will get the #VALUE error.

+ In the above string, there are 8 characters, if you enter the cell using the formula: = LEFT (B3,10) , the result you get is 20151219 , even if you want to cut 10 characters as in the medium formula. import.

+ If you do not enter the formula for the number of characters to cut in the string from left to right, its value will default to 1. For example, you enter the cell as: = LEFT (B3) , then Excel will understand are: = LEFT (B3,1) = 2 .

3.5 ★ | 2 Vote