Returns the number of bytes used to represent characters in a text string. This function works with double-byte characters.
SyntaxLENB(text) Text The text whose length is to be found. Spaces will be counted as characters.
The LENB function returns the number of bytes in a text string.
It is a text function. When we need to determine the length of text, using this function is very fast and accurate.
The difference from the LEN function is that the LENB function is calculated based on the number of bytes. The specific calculation form is: Chinese characters and punctuation marks in the full-width state are counted as 2, and numbers and punctuation marks in the half-width state are counted as 1.
The following is a demonstration of how to use this function.
First, position the cursor at B4 and click Insert Function-Text-LENB Function.
A dialog box will pop up with one parameter.
"String" refers to the string whose length needs to be calculated.
Enter B3 in "String" and click OK to get the total number of bytes of this text.
评论列表(196条)
测试