Count characters in cells with Excel for Mac (2024)

Excel for Microsoft 365 for Mac Excel 2021 for Mac Excel 2019 for Mac More...Less

When you need to count the characters in cells, use the LEN function. The function counts letters, numbers, characters, and all spaces. For example, the length of "It's 98 degrees today, so I'll go swimming" (excluding the quotes) is 42 characters—31 letters, 2 numbers, 8 spaces, a comma, and 2 apostrophes.

  • To use the function, enter =LEN(cell) in the formula bar and press Enter. In these examples, cell is the cell you want to count, such as B1.

  • To count the characters in more than one cell, enter the formula, and then copy and paste the formula to other cells.

  • To count a total number of characters in several cells, use the SUM functions along with LEN. For example, =SUM((LEN(cell1),LEN(cell2),(LEN(cell3)))). In this example, the LEN function counts the characters in each cell and the SUM function adds the counts.

  • To count certain, specific characters within cells, use the LEN function with the SUBSTITUTE function. For example, if you wanted to know how many lower case Zs were within a cell you'd use this formula: =LEN(cell1)-LEN(SUBSTITUTE(cell1,"z",""))

Give it a try

Type the following data into a new Excel worksheet. Start in cell A1.

Text Strings

Formulas

The quick brown fox

The quick brown fox jumped

The quick brown fox jumped over the lazy dog

Count characters in one cell

  1. Click cell B2.

  2. In the cell, enter =LEN(A2) and press Enter.

The formula counts of the characters in cell A2, and that number is 19, including all spaces. If you have spaces after the final period, the formula also counts them.

Count characters in multiple cells

  1. Press CONTROL + C to copy cell B2.

  2. Press CONTROL + V to paste its formula into cells B3:B4

This copies the formula to cells B3 and B4, and the function counts the characters in each cell (26, and 44).

Count a total number of characters

  1. Click cell B6.

  2. In the cell, enter =SUM(LEN(A2),LEN(A3),LEN(A4)) and press Enter.

This counts the characters in each of the three cells and totals them (89).

To count certain, specific characters within cells

  1. Click cell C4.

  2. In the cell, enter =LEN(A4)-LEN(SUBSTITUTE(A4,"z","")) and press Enter.

In short, this counts all lower case Zs in cell A4, which is 1.

Need more help?

Want more options?

Discover Community

Explore subscription benefits, browse training courses, learn how to secure your device, and more.

Communities help you ask and answer questions, give feedback, and hear from experts with rich knowledge.

Count characters in cells with Excel for Mac (2024)

FAQs

Count characters in cells with Excel for Mac? ›

Count characters in one cell

How do I count characters in all cells in Excel? ›

To get the a total count of all the characters in several cells is to use the SUM functions along with LEN. In this example, the LEN function counts the characters in each cell and the SUM function adds the counts: =SUM((LEN( cell1 ),LEN( cell2 ),(LEN( cell3 )) )).

How do you count cells that contain a character in Excel? ›

Examples
DataData
=COUNTIF(A2:A5,"*")Counts the number of cells containing any text in cells A2 through A5. The asterisk (*) is used as the wildcard character to match any character. The result is 4.
12 more rows

How do I count cells with letters in Excel? ›

In the empty cell, you can input the formula to count cells with text. The Excel formula for this function is "=COUNTIF (range, criteria)" without quotation marks. In this formula, the range is the cells you want to include in your count and the criteria is text.

How do I count entries in Excel for Mac? ›

On the Formulas tab, click More Functions, point to Statistical, and then click one of the following functions:
  1. COUNTA: To count cells that are not empty.
  2. COUNT: To count cells that contain numbers.
  3. COUNTBLANK: To count cells that are blank.
  4. COUNTIF: To count cells that meets a specified criteria.

How do you count characters in text? ›

It's easy to count characters in MS Word. Just go to the “Review” tab and click on “Word Count”. A pop-up window will appear, showing the number of characters, words, pages, paragraphs, and lines.

What is Len in Excel formula? ›

The LEN formula in Excel returns the number of characters in a given cell. For example, if cell A1 contains the text "Hello World", the formula "=LEN(A1)" would return "11", as there are 11 characters in the text "Hello World".

What is the formula to count characters in a cell sheets? ›

The LEN function is the most basic function for counting characters in Google Sheets. To use the LEN function, simply enter the formula =LEN(text) into the cell where you want to display the character count. Replace text with the cell reference or the text string you want to count.

How do you count characters in Excel without spaces? ›

Count number of characters excluding spaces with formula

1. Select a cell which will output the counted result, for instance, C1, and type this formula =LEN(SUBSTITUTE(A1," ","")), and press Enter key to get the result. If you need, you can drag the autofill handle over the cells needed the formula.

How do I count text in sheets? ›

To use the COUNTIF function in Google Sheets, enter the function followed by the range and the criterion within the parentheses. For example, if you want to count the number of cells in the range A1:A10 that contain the text "apple", you would enter the formula "=COUNTIF(A1:A10, "apple")" into a cell.

How do you count specific characters in multiple cells? ›

If you need to count specific characters in a range of cells, you can do so with a formula that uses LEN and SUBSTITUTE, along with the SUMPRODUCT function. In the generic form of the formula (above), rng represents a range of cells that contain words and txt represents the character you need to count.

How do you count occurrences in a range in Excel? ›

Count how often a single value occurs by using the COUNTIF function. Use the COUNTIF function to count how many times a particular value appears in a range of cells.

What is the formula to count words in a cell in Excel? ›

Step 1: Select the cell and enter the formula “=(LEN(cell)-LEN(SUBSTITUTE(cell,word,””)))/LEN(word)” as shown in the following image.

Top Articles
Latest Posts
Article information

Author: Merrill Bechtelar CPA

Last Updated:

Views: 6039

Rating: 5 / 5 (50 voted)

Reviews: 89% of readers found this page helpful

Author information

Name: Merrill Bechtelar CPA

Birthday: 1996-05-19

Address: Apt. 114 873 White Lodge, Libbyfurt, CA 93006

Phone: +5983010455207

Job: Legacy Representative

Hobby: Blacksmithing, Urban exploration, Sudoku, Slacklining, Creative writing, Community, Letterboxing

Introduction: My name is Merrill Bechtelar CPA, I am a clean, agreeable, glorious, magnificent, witty, enchanting, comfortable person who loves writing and wants to share my knowledge and understanding with you.