ExcelCSE.com

Menu
  • Excel 101
  • Excel Functions
  • Excel Formula
  • Contact Us
How to Use Excel > Excel Functions > Excel LEN Function

Excel LEN Function

How to Use the Excel LEN Function
Table of contents :
  • What is the Excel LEN Function?
  • LEN Syntax
  • How to Use LEN Function in Excel
  • LEN Example

Excel LEN Function

What is the Excel LEN Function?

The excel LEN function calculates the lengths of character including spaces, numbers, and dates but does not include the number and date format.

LEN Syntax

LEN(text)

text, required, for which to calculate the length, including spaces

How to Use LEN Function in Excel

Below is an example of the LEN function and its results.

LEN Function Excel

LEN Function #1

=LEN(A2)

The result is 4; there are four letters in cell A2 without spaces.

LEN Function #2

=LEN(A3)

The result is 5, increasing by 1 compared to LEN function #1. There is a space in the middle, LEN function counts all spaces wherever they are.

LEN Function #3

=LEN(A4)

The result is 4; the LEN function treats alphanumeric values just like text values.

LEN Function #4

=LEN(A5)

If LEN function calculates a number length, only counts the number and ignores the format. LEN function considers $1,234.00 as 1234. The result is 4.

LEN Function #5

=LEN(A6)

No data in cell A6? There is a space in cell A6. As mention before LEN function counts all spaces wherever the position.

LEN Function #6

=LEN(A7)

Like cell A6, no data appearance in cell A7. Unlike cell A6, which contains a space, cell A7 has an ENTER character, and LEN function counts as 1 character.

LEN Function #7

=LEN(A8)

Like cell A5, LEN function only counts the numbers, not including the format. The result is 5.

LEN Function #8

=LEN(A9)

Why are the results of date 2/1/2019 the same as number 43,497? Because Excel stores date values as numeric values. If you format the date 2/1/2019 with the number-general format, you get a number, 43497.

For a more detailed explanation of how Excel stores dates and times, read the following article:

  • How does Excel Store Dates and Times?

LEN Function #9

=LEN(A10)

Why are the results different from cell A9 even though the appearance is the same 2/1/2019?

Cell A9 contains a date value, by default right aligned, while cell A10 has a text, by default left aligned. The LEN function calculates text per letter, including slash. For date value, slash mark is date format, not the data.

LEN Function #10

=LEN(A11)

Decimal separator in decimal number count as 1 character. The result is 5

LEN Function #11

=LEN(A12)

Why are the results of cell A12 and cell A11 the same, even though the appearance is very different?

Excel stores date value as integer number and time value as a decimal number. If you format 3:00:00 AM to number-general format the result is 0.125.

Read “How does Excel Store Dates and Times?” for a more detailed explanation.

LEN Example

Another article using or explain about LEN Function
  • Add and Remove Leading Zeros in Excel
  • How to Combine and Separate First and Last Name in Excel

Another Text Function

Another article about Text Function
  • Excel TEXTJOIN Function
  • Excel CONCAT Function
  • Excel CONCATENATE Function
  • Excel REPLACE Function
  • Excel SUBSTITUTE Function
  • Excel REPT Function
  • Excel FIND Function
  • Excel SEARCH Function
  • Excel MID Function
  • Excel RIGHT Function
Usefull links
  • Microsoft LEN, LENB function documentation
Share
Tweet
Google+
Email
Prev Article
Next Article

Related Articles

Excel SUBTOTAL Function
What is the Excel SUBTOTAL Function? The Excel SUBTOTAL function …

Excel SUBTOTAL Function

Excel TRUNC Function
What is the Excel TRUNC Function? Excel TRUNC function truncates …

Excel TRUNC Function

How to Use IF Function in Excel
What is the Excel IF Function? The IF function is …

Excel IF Statement

Excel DATEVALUE Function
What is the Excel DATEVALUE Function? The DATEVALUE function converts …

Excel DATEVALUE Function

Excel DAY Function
What is the Excel DAY Function? The DAY function returns …

Excel DAY Function

Tags:How to Use LEN Function in Excel LEN Function Excel Text Functions What is the LEN Function in Excel

Categories

  • Excel 101
  • Excel Formula
  • Excel Functions

Recent Posts

  • Get the Original Price from Percentage Increase/Decrease
  • How to Add/Subtract Percentage in Excel
  • How to Extract Day, Month and Year from Date in Excel
  • How to Add Seconds, Minutes and Hours to a Time in Excel
  • How to Add Days, Weeks, Months and Years to a Date in Excel
  • How to Calculate Time Difference in Excel
  • Calculate Number of Days, Weeks, Months and Years Between Two Dates in Excel
  • Flash Fill Excel
  • Paste Special Excel
  • Excel TEXTJOIN Function
  • Excel CONCAT Function
  • Excel CONCATENATE Function
  • Excel REPLACE Function
  • Excel SUBSTITUTE Function
  • Excel REPT Function
  • Excel FIND Function
  • Excel SEARCH Function
  • Excel MID Function
  • Excel RIGHT Function
  • Excel LEFT Function

ExcelCSE.com

The Ultimate Guide How to Use Excel Better
Copyright © 2024 ExcelCSE.com
Contact Us - Privacy Policy - Sitemap | Theme by MyThemeShop.com

Ad Blocker Detected

Our website is made possible by displaying online advertisements to our visitors. Please consider supporting us by disabling your ad blocker.

Refresh