LEN function is used to discover the LENGTH of a cell – It allows us to know the number of characters in a certain cell.

Let’s see how it works:

Mary – 4 characters

had – 3 characters

a – 1 character

little – 6 characters

lamb – 4 characters

Total – 18

So how did we get 22 characters?

It is important to note that the SPACE character is considered a character, just like any other letter or digit in Excel. Therefore it is also counted in the total number of characters. 

We have 5 words, which means we have 4 SPACE characters which should be added to our calculation!

18 characters + 4 spaces = 22 characters! 🙂


The syntax of the LEN function is as follows:


text – We can either type a string or reference a cell containing a string.

We can type:


Or just reference a cell containing the word “Hello”, let’s assume it’s in cell A1:


In both cases, the result will be 5.

Practice LEN function

So, now it’s time to see how this function works: