LEN(), LENB()

Syntax

  • LEN(text)

  • LENB(text)

Definition. The LEN() function returns the number of characters in a string. The LENB() function returns the number of bytes for the double-byte characters in a string.

Arguments

  • text (required). The text whose length you want to determine.

Background. This function can be used for many tasks; for example, you could use the function together with other functions such as MID(), LEFT(), or RIGHT() to manipulate a string.

You can use this function to check whether an entry has a certain length. You can also check whether the content in text columns exceeds a given length. The function counts spaces and numerals as characters.

Example. Assume that you need to make sure that the interface descriptions in a column don’t ...

Get Microsoft® Excel® 2010 Formulas & Functions Inside Out now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.