Subscribe for New Post Notifications

Techworld

How to use the LEN function in Microsoft Excel

Let's look at some Excel Len function examples and explore how to use the Len function as a worksheet function in Microsoft Excel:

LEN function

Summary

LEN function can be useful if we wish to get the length of a given text string as the number of characters. LEN function will also count characters in numbers,special character, spaces, but number formatting is not included.
The Len function is a built-in function in Excel that is categorized as a Text Function.

Purpose

Get the length of given text string.

Return value

A numeric value.

What Does It Do ?

This function counts the number of characters, including spaces and numbers, in a piece of text.

Syntax

Len function has one syntax and hence they can be written in Two different ways:

=LEN(text) or
=LEN(cell reference)

Parameters or Arguments

Text: It is the text for which to calculate the length.
Cell reference: Reference to cells containing text.

Formatting

No special formatting is needed.

Usage notes

  • LEN is a useful when you want to count how many characters there are in some text.
  • LEN Function in Excel can be used to count the number of character in a text string and able to count letters, numbers, dates, special characters, non-printable characters, and all spaces from an excel cell.
  • LEN Function counts the characters in the value of a cell and not concerned with formatting. (i.e. the length of "88" formatted as "$88.00" is still 2).
  • Excel ignores cell formatting and uses raw data. It is of no use to use the LEN function on a date because Excel will always return a value of 5. Because Excel always stores a date as a 5-digit serial number.
  • If the cell is empty then Length function return 0 as output.
  • If letters are entered directly into the LEN function, they must be wrapped in double quotes or Excel will display the #NAME? error. Excel does not count the quotation marks.
  • If numbers are entered directly into the LEN function, they do not need to be wrapped in double quotes: both =LEN(12345) and =LEN("12345") are proper and produce a value of 5.

No comments:

Post a Comment