The Excel LEFT function is just perfect for retrieving a certain amount of characters from the left side of a text string, starting from the one that is closest to the left side.
Formula or Syntax
The following parameters can be found in the Excel LEFT function:
- text – refers to the text string to be extracted from.
- num_chars – this is the number of characters that will be extracted from the text string, beginning from the left.
The LEFT function is a function that comes with Excel software and can be adopted for both VBA and Worksheet Functions. Its major purpose lies in the extraction of text from the left side of a text in Excel. The LEFT function can return values containing more than one characters.
We would use the LEFT function to return characters from the different text as shown below.
Figure 1. The LEFT function will return characters from the texts.
To get the first returned characters, enter the formula for the Excel LEFT function. In the case of our example, our syntax changes specifically to, “LEFT(A3,3)”. This action returns the first three characters from the left in the word, “Cool”.
Figure 2. The Excel LEFT function returns the first three characters.
For the next column, we increase the number of characters from 3 to 6. This gives us the first six characters.
You would notice that there are only five actual letters in the text. This is because the Excel LEFT function considers empty spaces when returning characters in a text.
Figure 3. The Excel LEFT function returns the first six characters.
- Symbols and other number formats are not considered as characters by the LEFT function and won’t be returned, but:
- The LEFT function returns numbers from text strings as well.