LEN () and LENB () functions in Excel

The LEN () function returns the number of characters in the input text string. The LENB () function returns the number of bytes used to represent characters in the input text string. The LENB function only comes to 2 bytes per character when the default language is one of the languages ​​that supports DBCS.

When you need to determine the length of a string while processing data in Excel, you cannot count each character individually because it will take a lot of time if the text string is long. The LEN () and LENB () functions will help you count the number of characters in a string.

LEN () and LENB () functions in Excel Picture 1LEN () and LENB () functions in Excel Picture 1

If you do not know how to use the LEN () and LENB () functions, you follow the article below.

The article describes the syntax and usage of the LEN () and LENB () functions in Excel.

Description

The LEN () function returns the number of characters in the input text string.

The LENB () function returns the number of bytes used to represent characters in the input text string. The LENB function only comes to 2 bytes per character when the default language is one of the languages ​​that supports DBCS.

Syntax

= LEN (text)

= LENB (text)

Where: text is the input text string that you want to find its length, counting both spaces and required parameters.

For example

LEN ()

Count the number of characters of the string TipsMake.vn

= LEN ("TipsMake.vn")

LEN () and LENB () functions in Excel Picture 2LEN () and LENB () functions in Excel Picture 2

You can also refer to the text with a data box containing text for example: = LEN (B6)

LEN () and LENB () functions in Excel Picture 3LEN () and LENB () functions in Excel Picture 3

The LENB () function you use is similar to the LEN () function, but when using the LENB function, the default language of your computer and Office must be set as one of the languages ​​that support DBCS. Otherwise LENB () will return the same result as LEN ().

Above is how to use the LEN () and LENB () functions to get better results, you can combine these two functions with some functions in Excel. Good luck!

4.3 ★ | 7 Vote