LEN v/s LENB FUNCTION in Microsoft Excel

Hello Friends, Today We’ll discuss How to Use LEN & LENB Function in Excel.  These are from some of the powerful features of MS Excel. This tutorial will show you How you can use LEN & LENB Function to find out the length of a given String and What makes them different from each other.

LEN FUNCTION:

Image result for LEN Function in Excel

HOW TO USE LEN FUNCTION?

LEN Function is used to find out the length of any text String.It returns the number of Characters in a Text String.We can pass Text String in three ways, Directly, as a cell reference or as a text string returned from some other Function.

SYNTAX USED FOR LEN FUNCTION:

                                                           =LEN( text )

ARGUMENTS:

  • text: Text is the only argument for LEN Function, So it is mandatory to specify it.This is the Text String for which we want to find out the length of the String.

Let’s understand this through an Example. Consider the given spreadsheet, wherein  some text strings are specified in Column A,Microsoft Excel

So, To Find out the String Lengths of Column A, We would write LEN Function as,

  • To find out the length of Text String “Alphabet soup”, We would write,

  =LEN(A1)

That would result in 13 Characters in the given String.LEN Function also counts spaces.

  • Similarly for Text String “techonthenet.com”, LEN Function would be written as,

=LEN(A1)

That would result in 16 Characters in the given String.LEN Function also counts dots and special characters.

LENB FUNCTION:

LENB Function is used to count the number of bytes used for a text string.It counts two bytes per character.LENB Function works same as LEN Function except when the language is specified as DBCS.The Languages that support DBCS are Chinese, Japanese and Korean.

SYNTAX FOR LENB FUNCTION:

=LENB(text)

ARGUMENTS:

  • text: It is just same as LEN Function.This is the required and only parameter for LENB Function.It is the text string you want to find the length of.

For example:

For Japanese, Chinese or Korean Language, LENB counts a single character as two bytes, like this,

=LENB(“中国香港”)

It would result in 8, counting each character for two bytes.

But LENB Function works similarly like LEN Function for any other Language, counting each character as one byte.

So, This is How you can use LEN and LENB Function, However, LENB works same as LEN Function for other than DBCS Languages.The only difference between the two Functions is LEN counts 0ne byte for one character while LENB counts two bytes for one character of DBCS Language. If you like this post then you can share this post with your friends, colleagues, and relatives. We update information on the regular basis. You can also share this post on facebook, twitter, Instagram, Google+ or other social media website. If you have any question regarding this post then you can write in the comment section. We’ll revert back to you as soon as possible.

Add a Comment

Your email address will not be published. Required fields are marked *