From data to report in one minute or less. Ajelix BI is launched! 🚀 Get started for free.

How To Use LEN function in MS Excel With Examples

What is LEN function in Excel?

The LEN function in Microsoft Excel returns the number of characters in a text string excluding spaces, punctuation, and other non-alphanumeric characters. It is especially useful when performing calculations on large amounts of data.

LEN Function Description

The LEN function in MS Excel is a great tool for quickly and accurately measuring the length of text strings.

It’s extremely useful when dealing with large amounts of data as it can quickly scan an entire range of cells and give you a number equal to the longest string’s length.

It is also useful when you check that a particular string’s length is within a certain limit. This function can be used in other formulas, such as calculating the difference between two lengths of strings.

Struggling with your Excel formulas?
Looking for a faster and easier way to write Excel formulas? Try AI Excel Formula Generator and turn your text into formulas with just a few clicks.

Try for free

LEN Function Syntax

=LEN(text)

Where text is the text for which you want to find the length.

LEN Function Example in Excel

LEN function MS Excel - excel formulas explained - len function example - ajelix

Picture above shows you how LEN function syntax looks in the Excel. You can use this function to count the characters in the cell.

Function Example Result in Excel

LEN function MS Excel - excel formulas explained - len function example result - ajelix

In the picture you can see the returned results of the function. The function counted all the characters and returned the number.

Bonus Example

LEN function MS Excel - excel formulas explained bonus example - len function example - ajelix
In this example we can see that function counts different characters including numbers, spaces, semicolons, and different characters.

How to use LEN function MS Excel in your workbook:

  1. Open your Excel spreadsheet.
  2. Select the cell or range of cells you want to measure length.
  3. Click the “Formulas” tab at the top of the window.
  4. Click the “Text” category in the “Formulas” menu.
  5. Select “LEN” from the list of functions.
  6. Enter the cell or range of cells that you want to measure the length of in the “Number1” field.
  7. Click “OK” to complete the function.
  8. The result will appear in the cell you chose. The result is the number of characters in the cell or the range of cells you selected.

Frequently Asked Questions

What types of values can the LEN formula be used with?

The LEN formula can be used with any text string, including cell references that contain text.

Does the LEN formula count spaces and other non-alphabetic characters?

Yes, the LEN formula counts all characters in the string, including spaces and other non-alphabetic characters like punctuation marks and numbers.

Can the LEN formula be used with arrays or ranges of cells?

Yes, the LEN formula can be used with arrays or ranges of cells. When used with an array or range, the function returns an array of lengths, where each element corresponds to the length of the text in the corresponding cell.

More similar functions and formulas

Read latest blog articles about Excel

WEEKLY BLOG ARTICLES WITH INDUSTRY NEWS AND HELPFUL GUIDES

How To Analyze Data In Excel Spreadsheet

How To Analyze Data In Excel Spreadsheet

Continue reading

How To Add Drop Down List in Excel

How To Add Drop Down List in Excel

Continue reading

How To Add Checkboxes In Excel

How To Add Checkboxes In Excel

Continue reading