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
- 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
May be interested
- How to separate first and last name in excelhow to separate names in excel? this may seem simple but not everyone knows?
- How to display the Ruler bar in Word versionsbut sometimes in word documents we don't see the ruler bar. to find the lost ruler, let's explore the following article
- How to insert audio audio music into Powerpointinstructions on how to insert audio audio into powerpoint more vividly in the fastest, simplest and most professional way
- Guide to Automatic Filter and Filter detailed data in excelto search and create small data tables that meet some conditions as required into big tables, we have to filter those data.
- How to merge cells in Excel 2003 2007you have 1 form, and you need to combine several cells into 1 cell in excel to be able to follow that form.
- Common keyboard shortcuts in WORD you need to know.the most common, basic and common shortcuts used in word make your word processing work faster