When to use it
You can use the LEFT function in Excel when you need to extract a specific number of character(s) from a cell/string...
...starting from the first (left) character.
How to use it
You need to refer to the main text and the numbers of characters which you want to extract from that text string.
In the below example, we have extracted the first four characters from the cell where we have “Jack Brown”.
What it Returns
It returns the specific number of characters in the result.
The left function has total 2 arguments out of which one is optional.
- text - A text or number from which you want to extract characters.
- [num_char] - Number of characters you want to extract.
The argument in square brackets is optional.
Important Points to Remember
Here are some of the important points you need to remember while using the LEFT function in Excel.
- num_char can be zero or greater than zero.
- If you skip specifying num_char, it will assume 1 as default.
- You can’t refer to more than one cell. If you do that it will return the characters from the top right cell of the selected range.
- It can work with numbers also in the same manner.
- It can also work as an array formula.
- With negative num_char, it will return an error.
- You can also enter a text string directly into the formula.
In the below example, we have extracted the first five digits from the text string using LEFT by specifying the number of characters to extract.
In the below example, we have used LEN and FIND along with the LEFT to create a formula which extracts the name from the cell.
It first counts total length of the text string and then finds the position of space between first and last name.
And in the end, it extracts the first name from the test string.