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

How do I count characters in Excel for Mac? ›

Count characters in one cell

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

How do you count cells with text in Excel Mac? ›

Input formula

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 you count the number of times a character appears in a cell in Excel? ›

That is, use the formula =(LEN(A2)-LEN(SUBSTITUTE(A2, "r","")))/LEN("r") and click enter. Empty cell > Formula > Enter. =(LEN(A2)-LEN(SUBSTITUTE(UPPER(A2),UPPER("remove"),"")))/LEN("remove"). This is how you can count the number of times a character or word appears in a cell in Excel.

How do you count the number of cells containing any text 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

Which Excel function is used to count characters? ›

To use the function, enter =LEN(cell) in the formula bar, then press Enter on your keyboard.

How do you count rows in Excel on a Mac? ›

Just click the column header. The status bar, in the lower-right corner of your Excel window, will tell you the row count.

How to count cells with values in Excel? ›

On the Formulas tab, click More Functions, point to Statistical, and then select 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.

Can you count in Excel based on text? ›

If you want to count logical values, text, or error values, use the COUNTA function. If you want to count only numbers that meet certain criteria, use the COUNTIF function or the COUNTIFS function.

How to count the number of characters in a cell in Excel? ›

Excel formula to count the number of characters in a cell
  1. Enter the below formula in any empty cell in row 3: =LEN(A3)
  2. Double-click the fill handle to get the formula copied across the whole column.
Feb 7, 2023

How do you count text occurrences in Excel? ›

You can just enter the formula in the =COUNTIF(A3:A12,”two”) to count the occurrences of the word “two” in the given range of cells A3 to A12. Wildcards can be used to count cells with a specific text value.

How to count specific words in Excel cell? ›

Example
  1. Original Data: Place the feedback in cell A1.
  2. Target Word: You want to count the occurrences of the word "apple."
  3. Formula Setup: In cell B1, enter the formula: =(LEN(A1)-LEN(SUBSTITUTE(A1,"apple","")))/LEN("apple")
  4. Get the Result:
Sep 18, 2023

How do you count cells with specific text in a spreadsheet? ›

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 many characters are in an Excel cell? ›

The total number of characters that a cell can contain is 32,767. A cell can only display 1,024 characters. At the same time, the Formula bar can show all 32,767 symbols.

What is the formula for count in Excel? ›

Use the COUNT function to get the number of entries in a number field that is in a range or array of numbers. For example, you can enter the following formula to count the numbers in the range A1:A20: =COUNT(A1:A20). In this example, if five of the cells in the range contain numbers, the result is 5.

Top Articles
Latest Posts
Article information

Author: Barbera Armstrong

Last Updated:

Views: 5462

Rating: 4.9 / 5 (79 voted)

Reviews: 86% of readers found this page helpful

Author information

Name: Barbera Armstrong

Birthday: 1992-09-12

Address: Suite 993 99852 Daugherty Causeway, Ritchiehaven, VT 49630

Phone: +5026838435397

Job: National Engineer

Hobby: Listening to music, Board games, Photography, Ice skating, LARPing, Kite flying, Rugby

Introduction: My name is Barbera Armstrong, I am a lovely, delightful, cooperative, funny, enchanting, vivacious, tender person who loves writing and wants to share my knowledge and understanding with you.