Arrow left
Back to guides
Google Sheets Formulas

LEN Function in Google Sheets: Explained

In this article, you will learn how to use the LEN formula in Google Sheets.

How does the LEN function work in Google Sheets

The LEN formula counts the number of characters in a given text string. The LEN function is useful when you simply count the number of letters in a cell or check whether the number of characters in a cell meets the maximum or minimum requirements.

How to use the LEN function in Google Sheets

  1. Type “=LEN” or go to “Insert”“Function” (or directly navigate to the “Functions” icon)  “Text”“LEN”.
  2. Input a decimal Unicode by manual input or cell reference.
  3. Press the “Enter” key.
How to insert the LEN function from the menu bar in Google Sheets

The general syntax is as follows:

=LEN(text)

Text: a text string whose number of characters to be counted

Note: The LEN function counts all characters, including spaces. If you have unexpected values returned by the LEN formula, ensure you don’t have such special letters in the original text strings. When you input text manually, don’t forget to enclose them with quotation marks.

Look at the following examples in the screenshot. As you can see, it is simple to use this formula. Once you input text or select a cell containing a text string, the LEN function immediately returns the number of characters in the chosen text.

How the LEN function works in Google Sheets

As we mentioned at the beginning of this article, you can leverage this function to confirm if a specific text meets a criterion on character count or not. Assume you want to test if each text string includes ten or more characters. You can use the IF function with the LEN function in the following steps.

  1. Enter text strings whose number of characters you want to check (shown in Column B)
  2. Count the number of characters in each text by the LEN function (shown in Column C)
  3. Check whether the returned number for each text is ten or over by the IF function (shown in Column D)

In the upper table, you have three columns (Columns B to D), “Text string”, “Outcome”, and “Test (Min: 10)”, which correspond to each step above. However, as seen in the lower table, you can combine the two formulas by incorporating the LEN function in the IF function.

How to use the LEN function with the IF function in Google Sheets

Learn how to do this step-by-step in the video below 👇

Automate financial reporting with LiveFlow

Want to eliminate manual updates of your Excel & Google Sheets models?

Yes, show me how

Need help?

Our team is here to help you any time between 9am and 10pm EST.
Check Icon
Email us at: help@liveflow.io

Liked this article? Then you'll love the ones below