The LEFT function is one of the text functions in Microsoft Excel. You can use it as a standalone function as well as in collaboration with the other functions. This article will give you an overview of the LEFT function in Excel.
The LEFT function returns a certain number of characters from the left side of a text string that is supplied to the function. For example, =LEFT(text,2) returns te which is the 2 characters from the left-most side of the string text.
=LEFT (text, [num_chars])
- text: Compulsory. The text string from which you need to extract the characters.
- num_chars: Optional. It refers to the number of characters you want to extract from the text.
One or more characters.
Examples of LEFT Function
Suppose, you have a text string text which is xyzt and you want to extract the first 3 characters. To do that, you can use the LEFT function. Here is the formula using the LEFT function:
The output will be xyz.
Here are some examples of the usage of the LEFT function.
Usage Guide of LEFT Function
Step_1: Start with inserting an equal sign (=) in a blank cell.
Step_2: Then type LEFT.
Step_3: Type open parenthesis “(“.
As you type the open parenthesis, Excel shows the syntax of the LEFT function.
Step_4: Insert the text first.
You can directly insert the text or a cell address that contains the text.
Here, I’m inserting A2 which has the text.
Step_5: Then insert a comma (,).
After inserting the comma, Excel will ask you for the second argument which is the num_chars.
Step_6: Now insert the second argument num_chars.
You can insert the cell address of the num_chars or directly insert the num_chars.
Here, the num_chars is in cell B2. So, I’m inserting B2 inside the function.
Step_9: After that, insert the closing parenthesis “)”.
Step_10: Finally, hit the ENTER button to insert the formula inside the cell.
The LEFT function returns xyz. Here, the text is xyzt and the second argument num_chars is 3. The LEFT function starts from the left side of the text and extracts 3 characters from xyzt. As the first 3 characters from the left side of xyzt are xyz, the LEFT function returns xyz as a result.
- The LEFT function counts the spaces as characters too.
- It takes all punctuation marks into consideration as well.
- If the num_chars argument is omitted, the LEFT function returns the entire text string.
- If the text string is empty, the output will also be empty.
- The LEFT function is case-sensitive, meaning that it distinguishes between uppercase and lowercase characters.
- If the text argument is an error value (e.g., #N/A, #VALUE!), or if the num_chars argument is not a positive integer, the LEFT function returns an error value.
The LEFT function is one of the text functions in Excel. If you have any questions regarding the LEFT function, please comment below. Thanks!