Clear, practical technology insights BSOD Code Lookup · Windows Error Code Lookup · Wi-Fi Troubleshooting · PC Troubleshooting Checklist

The LEFT Function, How to Use the Left-Hand String Cutting Function

LEFT Excel Function is the focus of this article. The LEFT function in Excel is used to trim the left string of characters in data parameters.

Table of Contents

Understanding LEFT Excel function requires more than a headline. The overview below breaks down the key facts, changes, and user impact.

  • How to use Vlookup function in Excel
  • How to combine Sumif and Vlookup functions in Excel
  • Use VLOOKUP to join two Excel tables together
  • The COUNTA function, how to use the function to count cells containing data in Excel

Instructions for Using LEFT Function in Excel

The LEFT function has a syntax of = LEFT (text; [num_chars]). Inside:

  • Text is the required text string, this is the text string or cell reference to the text string containing the characters you want to extract.
  • Num_chars is an optional argument, this is the number of characters you want the LEFT search function to start from the first position to the left of the text.
  • Num_chars must be greater than or equal to zero, if num_chars
  • Num_chars is larger than the length of the text, the LEFT function returns the entire text.
  • If num_chars is omitted, the default num_chars = 1.

Example 1: Use the LEFT Function to Find the Character

In the table below, use LEFT function to find the first 3 characters in cell B2. Enter the formula = LEFT (B2.3) and press Enter.

The LEFT Function, How to Use the Left-Hand String Cutting Function – Example 1: Use the LEFT Function to Find the Character

The result is that we get 3 characters from left to right of the character string in cell B2.

The LEFT Function, How to Use the Left-Hand String Cutting Function – Example 1: Use the LEFT Function to Find the Character

Or in the input formula, you can replace the position of the cell containing the string with the character and enclosed in the quotation mark as shown.

The LEFT Function, How to Use the Left-Hand String Cutting Function – Example 1: Use the LEFT Function to Find the Character

Example 2: The LEFT Function Combines SEARCH Function

When combining these two functions together, we will use it to search for a string of characters preceded by a certain character, such as taking the last name in the full name column, taking the country code except the phone number. In the column name are separated by spaces, so we use the formula = = LEFT (B2, SEARCH ("", B2) -1) and then press Enter.

Then -1 to not extract space characters when searching for characters.

The LEFT Function, How to Use the Left-Hand String Cutting Function – Example 2: The LEFT Function Combines SEARCH Function

The result you get is the character string in the box. Scroll down to the boxes below to get more results.

The LEFT Function, How to Use the Left-Hand String Cutting Function – Example 2: The LEFT Function Combines SEARCH Function

For the phone number range that you want to get the country code before the dot, enter the formula = LEFT (B5, SEARCH (".", B5) -1) and press Enter.

The LEFT Function, How to Use the Left-Hand String Cutting Function – Example 2: The LEFT Function Combines SEARCH Function

The result will only get the country code in the phone number.

The LEFT Function, How to Use the Left-Hand String Cutting Function – Example 2: The LEFT Function Combines SEARCH Function

Example 3: Combining LEFT Function with LEN Function

LEN functions are very useful in combination with the string finder functions. With LEFT function when adding LEN function to remove certain characters from the end of the string. Combination formula = LEFT (text, LEN (text) - character to move).

The LEN function takes the total number of characters in a string, then subtracts the number of characters to remove from the total length of the sequence. The LEFT function will return the remaining number of characters.

For example, remove the 5 characters of the string in cell B2, enter the formula = LEFT (B2, LEN (B2) -5) and press Enter.

The LEFT Function, How to Use the Left-Hand String Cutting Function – Example 3: Combining LEFT Function with LEN Function

As a result, we have the remaining characters when we have removed the last 5 characters in the character string, including spaces.

The LEFT Function, How to Use the Left-Hand String Cutting Function – Example 3: Combining LEFT Function with LEN Function

Example 4: Combining LEFT Function and VALUE Function

When these two functions work together, it returns the numeric character, instead of the text string as in the LEFT function. For example, export the first 2 characters of the string in cell B5, enter the formula = VALUE (LEFT (B2.2)).

The LEFT Function, How to Use the Left-Hand String Cutting Function – Example 4: Combining LEFT Function and VALUE Function

The result is the number to look for as shown.

The LEFT Function, How to Use the Left-Hand String Cutting Function – Example 4: Combining LEFT Function and VALUE Function

Above is how to use the LEFT function to get the character string from the left and examples when combining LEFT function with other functions. If an error occurs, the user needs to check if num_chars is greater than 0.

I wish you all success!

FAQ

What happened in The LEFT Function, How to Use the Left-Hand String Cutting Function?

Understanding LEFT Excel function requires more than a headline.

What factors influenced LEFT Excel function?

The overview below breaks down the key facts, changes, and user impact.

What was the practical impact on users?

How to use Vlookup function in Excel How to combine Sumif and Vlookup functions in Excel Use VLOOKUP to join two Excel tables together The COUNTA function, how to use the function to count cells containing data in Excel Instructions for Using LEFT Function in.

Discussion

Reader Comments 0

Sign in with email or Google to join the discussion.