The LENB function returns the length of a string in bytes.

Parts of a LENB function

LENB(string)

PartDescription
stringThe string to get the length in bytes

Notes

LENB returns the same value as LEN if the input string has only single byte characters.

Examples

ABC
1InputFormula
2Aeñ=LENB(A2)
3Aeñ=LEN(A3)
4熊本=LENB(A4)
5熊本=LEN(A5)
  • MIDB: ​The MIDB function returns a section of a string starting at a given character and up to a specified number of bytes.
  • LEFTB: The LEFTB function returns the left portion of a string up to a certain number of bytes.
  • RIGHTB: The RIGHTB function returns the right portion of a string up to a certain number of bytes.