How to Count Characters in Google Sheets

Last Updated on April 13, 2023 by Jake Sheridan

In this tutorial, you will learn how to count characters in Google Sheets.

How to Count Characters in Google Sheets

The LEN function in Google Sheets is a useful function that can help you count the number of characters in a string.

This can be helpful if you need to get an idea of how long a string of text is, or if you need to make sure that a certain field is within a certain length.

For example, you may be dealing with form data and you want to make sure that the user’s input does not exceed a certain number of characters. In this case, the LEN function can be used to quickly check the length of the input.

In this guide, we will show you how to use the LEN function in Google Sheets to quickly count the number of characters in a string.

We will also show you how to use the LEN and SUBSTITUTE functions together to count the number of times a particular character appears in a text.

How to Find the Length of a String of Text in Google Sheets

Here’s how to find the length of a string of text in Google Sheets.

Step 1

We can find the length of a particular text value by using the LEN function.

In the example above, we used the formula =LEN(A2) to find the length of the string “Hello World”. Do note that the LEN function counts all characters, even whitespace characters.

Step 2

We’ll use the AutoFill feature to count the number of characters of all our sample text values.

Step 3

The LEN function also works for numerical numbers of any format.

Step 4

There may be instances where you do not want to count leading or trailing whitespace characters. We can use the TRIM function inside our argument to remove these unnecessary whitespace characters before returning the length of the text.

Step 5

Another related use case when counting characters is finding the number of times a particular character appears in a text. We can use the LEN and SUBSTITUTE functions together to find this value.

The formula above works by using the SUBSTITUTE function to remove all instances of the chosen character from the string. For example, the text “Hey There!” becomes “Hy Thr!” after removing all instances of the letter “e”.

Once we have our new string, we’ll just need to find the difference in length between the original text and the new text

Summary

This guide should be everything you need to count characters in Google Sheets.

You may make a copy of this example spreadsheet to test it out on your own.