How to use the LEN function in Excel

The LEN function in Excel is used to measure the length of a certain string of characters, including spaces and correctly return the total character for the user.

While manipulating and processing spreadsheets on Excel , for business needs you need to specify the length of the string. We can use the LEN function to get the fastest and most accurate result of the number of characters to define.

With the manual way of counting each character in Excel, you will only apply to Excel data tables with little data and only parameters. As for tables with lots of data, that approach is completely impossible, unusable and too time consuming. If so, we can use the LEN function in Excel to measure the length of any string in the table. This function will return the total number of correct characters of the string, including spaces. The following article of Network Administrator will guide you how to use the LEN function in Excel.

  1. These are the most basic functions in Excel that you need to understand
  2. Summary of expensive shortcuts in Microsoft Excel

The LEN function syntax in Excel is LEN (text) .

In which Text is a string of characters to count. The function will return the length of the string, including the space character .

Example 1:

For example, I will count the student name in cell B2 in the table below.

How to use the LEN function in Excel Picture 1How to use the LEN function in Excel Picture 1

Step 1:

To measure the length of the string 'Phạm Hà Anh' we will enter the formula to calculate = LEN (B2) . Press Enter to execute the LEN function.

How to use the LEN function in Excel Picture 2How to use the LEN function in Excel Picture 2

Step 2:

After that, the total number of characters in the string will be returned as shown below.

How to use the LEN function in Excel Picture 3How to use the LEN function in Excel Picture 3

Note to the user , I change the text string with cell B2 because the character string is accented so Excel will not receive it. In case the character string is not accented, you can enter the text directly.

How to use the LEN function in Excel Picture 4How to use the LEN function in Excel Picture 4

The result also returns as correct.

How to use the LEN function in Excel Picture 5How to use the LEN function in Excel Picture 5

Example 2:

We will combine the LEN function with any function, such as taking the numerical value in the middle of the SV code column to include it in the Number column. This will use the MID function and the LEN function.

How to use the LEN function in Excel Picture 6How to use the LEN function in Excel Picture 6

Step 1:

In the example table, at the beginning and end of the character in the SV code column will be the letter character. Proceed to cut the string from the 3rd position, and get the number of characters needed by taking the length of the string minus 4.

The formula in this case is = MID (C2, 3, LEN (C2) - 4) .

How to use the LEN function in Excel Picture 7How to use the LEN function in Excel Picture 7

When pressing Enter the result will return the correct character in the middle as shown below. When dragging down the cells below to copy the formula will also have the same result.

How to use the LEN function in Excel Picture 8How to use the LEN function in Excel Picture 8

Here's how to use the LEN function in Excel, the function that calculates the length of any string in the table, along with how to combine the LEN function with another function like the MID function in the lesson. Depending on the circumstances required by the data table, we use the LEN function, as well as matching with other functions accordingly.

I wish you all success!

4 ★ | 2 Vote