Site icon ExcelNotes

How to Use LENB Function

The LENB function counts the number of bytes including spaces in a text string. When a double-byte character set (DBCS, e.g., Japanese, Simplified Chinese, Traditional Chinese and Korean) is set as the default language, each character will be counted as 2 bytes. Otherwise, the LENB function is the same as LEN function.

Formula:

=LENB(text)

Explanations:

The text is required, which is the text string that you need to count the number of bytes.

Cautions:

The spaces will be counted as characters when using the LENB function. Each character will be counted as 2 bytes when a double-byte character set (DBCS, e.g., Japanese, Simplified Chinese, Traditional Chinese, and Korean) is set as the default language.

Example 1: How many bytes in cell A2?

=LENB(A2)
The result returns 3 in cell A2.

Example 2: How many bytes in cell A3?

= LENB(A3)
The result returns 7.

Example 3: How many bytes in cell A4?

=LENB(A4)
The result returns 24.

Download: LENB Function

Exit mobile version