LEN Function in Excel

In this post, let’s learn how the LEN Function works in excel, describes the formula syntax, and how you can use the LEN Function in your excel spreadsheet.  

What is LEN Function in Excel?  

The LEN function in Excel is used to calculate the number of characters in a string. It is a text function in excel, also known as the LENGTH Function in excel.  

It counts the letters, numbers, special characters, non-printable characters, and all spaces in an Excel cell.  

Syntax of LEN Function  

=LEN(text)  

Parameter  

  • Text– length of the text to be calculated.  

Example  

LEN(A1)  

LEN(“Developerpublish.com”)  

How to use LEN Function in Excel?  

The following steps will explain the work of the LEN function in an excel spreadsheet:  

First, prepare an excel sheet with the specified details in it, or open an existing file with data.  

Example 1:  

In this example, we are going to calculate the length of the string in the column by using the LEN command following the ”=” operator and within the parenthesis declare the address of the cell which to be calculated.  

How to use LEN Function in Excel?

Example 2:  

The LEN Function is also used in other functions.  

  • SUBSTITUTE and LEN Function  

This combo is used to calculate the length of the text by eliminating the spaces in the text.  

Syntax:=LEN(SUBSTITUTE(A2,” “,””))  

How to use LEN Function in Excel?
  • SUM and LEN Function  

This combo is used to calculate the length of the characters in different cells.  

Syntax: =SUM(LEN(A2),LEN(B2)) 

How to use LEN Function in Excel?

LEN Function is also used as VBA Function, 

Syntax

LENcount = Application.Worksheetfunction.LEN(“text”) 

Note:  

  • The LEN Function doesn’t calculate the length of the formatted text.   
  • The length of the empty cell is 0.   

Leave A Reply

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

You May Also Like

In this post, you’ll learn how to Find Blank cells in excel so that you can remove or delete the blank cells form...
In this article, you’ll learn what is a Gauge Chart in Microsoft Excel. Also, you will learn how to add...
Microsoft Excel provides a shortcut for the users to move columns in excel using two different ways – using Shift...