Do you know the structure and usage of the 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.
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:
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 .
You should read it
- The LEFT function, how to use the left-hand string cutting function in Excel
- LEFT function in Excel, how to use LEFT function and illustrative examples
- LEFT function in SQL Server
- How to combine Vlookup function with Left function
- How to use the FIND function in Excel?
- T.DIST - The function returns the Student t-distribution on the left in Excel
- CHISQ.INV function - The function returns the inverse of the probability of the left end of the distribution when squared in Excel
- How to use Excel's VALUE function
- How to use MID functions to get strings in Excel
- LTRIM function in SQL Server
- How to combine Index and Match functions in Excel
- How to switch left to right mouse on Windows 11
Maybe you are interested
Apple just made a move that left Spotify users 'stunned'
How to fix 'No Space Left on Device' error on Linux
Detection of gene variation that leads to left-handedness
The village has not had a single wedding for more than 10 years: Crops fail, young people cannot marry, the elderly are left behind in the countryside... just because of this!
The rare fish species only had 37 left, living in Devil's Hole
Error left clicking on Properties, why and how to fix it?