How can I count specific characters in Google Sheets?

Google Sheets is a powerful spreadsheet software that allows users to organize and manipulate data. One useful feature of Google Sheets is the ability to count specific characters within a given range of cells. This function is useful for tasks such as counting the number of times a particular letter or symbol appears in a document. To use this feature, users can simply input the desired characters to be counted and the range of cells to be searched. Google Sheets will then generate a count of the specific characters within that range, providing an efficient way to analyze and track data.

Count Specific Characters in Google Sheets


You can use the following formulas to count the number of specific characters in cells in Google Sheets:

Formula 1: Count Specific Characters (Case-Sensitive)

=LEN(A2)-LEN(SUBSTITUTE(A2,"a","")) 

This particular formula counts all occurrences of the character “a” in cell A2.

This formula is case-sensitive, so any “A” characters in cell A2 will not be counted.

Formula 2: Count Specific Characters (Case-Insensitive)

=LEN(A2)-LEN(SUBSTITUTE(LOWER(A2),"a",""))

This particular formula counts all occurrences of the character “a” in cell A2.

This formula is case-insensitive, so any “A” characters in cell A2 will also be counted.

The following examples show how to use each formula in practice with the following list of names in Google Sheets:

Example 1: Count Specific Characters (Case-Sensitive)

We can type the following formula into cell B2 to count the number of times the character “a” occurs in cell A2:

=LEN(A2)-LEN(SUBSTITUTE(A2,"a","")) 

We can then click and drag this formula down to each remaining cell in column B:

Column B now shows the number of times the character “a” occurs in each corresponding cell in column A.

Example 2: Count Specific Characters (Case-Insensitive)

We can type the following formula into cell B2 to count the number of times the character “a” occurs in cell A2:

=LEN(A2)-LEN(SUBSTITUTE(LOWER(A2),"a","")) 

We can then click and drag this formula down to each remaining cell in column B:

Google Sheets count specific characters in cell

Column B now shows the number of times the character “a” occurs in each corresponding cell in column A.

Notice that the formula returns 1 for the name Andy because this formula is case-insensitive so “A” is counted.

Additional Resources

The following tutorials explain how to perform other common operations in Google Sheets:

x