Returns the number of bytes used to represent characters in a text string. This function works with double-byte characters.
Syntax
LENB(text)
Text The text whose length is to be found. Spaces will be counted as characters.
The LENB function is to return the bytes of the text string number.
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 by the number of bytes. The specific calculation form is:
Chinese characters and punctuation marks in full-width state are counted as 2, and numbers and punctuation marks in half-width state are counted as 1.
The following shows you 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条)
测试