Pinterest Pixel

How to Count If Cell Contains Text in Excel

John Michaloudis
When working with data in Excel, there are times when I need to count how many cells contain specific text.
Thankfully, Excel has a few handy functions that make this task simple and efficient.

Let me show you how I use them to streamline my data analysis!
How to Count If Cell Contains Text in Excel | MyExcelOnline How to Count If Cell Contains Text in Excel | MyExcelOnline

Key Takeaways:

  • Use the COUNTIF function to count if cell contains text quickly.
  • Apply wildcards to count cells with partial matches, such as “apple” in “Apple Airpods.”
  • Use COUNTIFS for advanced scenarios with multiple criteria.
  • COUNTIF can also be used to count non-blank text cells.
  • Troubleshooting common errors, like inconsistent formatting, ensures accurate counts.

 

Unveiling the Excel Text-Count Mysteries

Why Count Cells with Text?

Counting cells with text is crucial when dealing with data that includes text entries. Whether it’s categorizing feedback, tracking project stages, or organizing inventory with item descriptions, the ability to quickly tally text information empowers us to analyze qualitative data, create summaries, and make informed decisions.

By understanding the frequency or presence of certain text data, we can derive meaningful insights and manage large datasets efficiently.

From Basics to Advanced: Counting Text in Excel

Diving into Excel’s capabilities, we start with a straightforward formula, =COUNTA(), which can tally all non-blank cells, including those with text. I followed these steps to use this formula:

STEP 1: Select an empty cell and input the formula “=COUNTA(“.

Count If Cells Contains Text in Excel

STEP 2: Mentioned the range of the cells want to count text cells after the round bracket and close the bracket. Like “=COUNTA(A1:A11)”.

Count If Cells Contains Text in Excel

STEP 3: Press enter to check the result. Here though, 11 rows were selected in the range but the output is 10 because one of the cell was empty. This will count all cells with text within the column range A1:A11.

Count If Cells Contains Text in Excel

However, for more advanced control, we turn to the =COUNTIF() and =COUNTIFS() functions, which allow us to specify conditions.

 

Quick Start Guide to Count If Cell Contains Text

The Mighty COUNTIF Function

The =COUNTIF() function is my go-to tool for efficiently counting cells with specific text. Its beauty lies in its simplicity, follow these steps:

I enter =COUNTIF(range, criteria), and voilà, the cells with text meeting my criteria are counted. It’s perfect for quickly tallying responses or occurrences of particular entries within a spreadsheet. Find out the number of employees under the “Operations” department by using this formula – “=COUNTIF(C1:C11, “Operations”).

Count If Cells Contains Text in Excel

And it’s not only limited to text; =COUNTIF() can also count numbers, and dates, and even apply logical statements for a more dynamic data analysis experience.

 

Pushing Excel Limits: Advanced Tricks

Multifaceted COUNTIFS: Harnessing Criteria Power

COUNTIFS is like a Swiss Army knife for multi-condition scenarios. This multifaceted function follows the format =COUNTIFS(criteria_range1, criteria1, [criteria_range2, criteria2],…), allowing me to apply several criteria across different ranges. It’s particularly powerful because I can analyze data with nuance, such as counting the instances of a particular text occurring on certain dates or within specific categories.

The beauty here is in the layering – each new condition refines the search, ensuring only the most relevant cells are counted.

Count If Cells Contains Text in Excel

Using Wildcards: Expanding Your Text Count Horizons

Expanding my text count horizons requires embracing wildcards. The asterisk * and question mark ? become powerful allies when counting partial matches or single, uncertain characters, respectively. It helps me count cells that meet specific criteria, even if I’m only searching for partial matches.

Let’s say I have a list of product names in column A (from A2 to A10), and I want to count how many of these product names contain the word “Apple.”

=COUNTIF(A2:A10, “*Apple*”)

Count If Cell Contains Text in Excel

This would return 5 because there are five product names in the list that contain the word “Apple.”

 

Steering Clear of Common Pitfalls

Troubleshooting Text Count Errors

Troubleshooting text count errors can sometimes feel like unraveling a mystery. It’s often a case of ensuring data is consistent – are the texts truly matching or are there sneaky leading or trailing spaces? Using the TRIM function can clear those invisible discrepancies.

Count If Cell Contains Text in Excel

Another common gremlin is differentiating between numbers stored as text and actual numeric values – a situation where ISTEXT can clarify what’s what. It’s essential to tidy up the data and verify formats to ensure accuracy in my counts.

Count If Cell Contains Text in Excel

 

FAQs

1. How do I count non-blank text cells in Excel?

To count non-blank text cells in Excel, you can use the COUNTIF function with an asterisk (*). For example, =COUNTIF(A1:A10, "*") counts all cells in the range A1 to A10 that contain any text.

2. Can I count cells with text that meets multiple criteria?

Yes, to count cells with text that meets multiple criteria, use the COUNTIFS function. For instance, =COUNTIFS(range1, "text1", range2, "text2") counts cells where range1 contains “text1” and range2 contains “text2”.

3. How do you check if a cell in Excel contains certain text?

You check if a cell in Excel contains certain text using the COUNTIF function with a wildcard. For example, =COUNTIF(A1, "*text*") returns 1 if cell A1 contains the word “text” anywhere within it.

4. What if the cell contains a partial match such as pineapple or red apple?

For a partial match like “pineapple” or “red apple”, use wildcards in COUNTIF. For instance, =COUNTIF(A1:A10, "*apple*") counts all instances where “apple” appears in any part of the cell within the range A1 to A10.

5. How many cells with text there are in your worksheet?

To find how many cells with text are in an Excel worksheet, use the COUNTIF function with an asterisk wildcard. Use =COUNTIF(A1:Z100, "*") to count all cells containing text in the range A1 to Z100.

If you like this Excel tip, please share it
Founder & Chief Inspirational Officer at

John Michaloudis is a former accountant and finance analyst at General Electric, a Microsoft MVP since 2020, an Amazon #1 bestselling author of 4 Microsoft Excel books and teacher of Microsoft Excel & Office over at his flagship MyExcelOnline Academy Online Course.

See also  $ Dollar Sign in Excel: Absolute, Relative, and Mixed Cell References

Star 30 Days - Full Access Star

One Dollar Trial

$1 Trial for 30 days!

Access for $1

Cancel Anytime

One Dollar Trial
  • Get FULL ACCESS to all our Excel & Office courses, bonuses, and support for just USD $1 today! Enjoy 30 days of learning and expert help.
  • You can CANCEL ANYTIME — no strings attached! Even if it’s on day 29, you won’t be charged again.
  • You'll get to keep all our downloadable Excel E-Books, Workbooks, Templates, and Cheat Sheets - yours to enjoy FOREVER!
  • Practice Workbooks
  • Certificates of Completion
  • 5 Amazing Bonuses
Satisfaction Guaranteed
Accepted paymend methods
Secure checkout

Get Video Training

Advance your Microsoft Excel & Office Skills with the MyExcelOnline Academy!

Dramatically Reduce Repetition, Stress, and Overtime!
Exponentially Increase Your Chances of a Promotion, Pay Raise or New Job!

Learn in as little as 5 minutes a day or on your schedule.

Learn More!

Share to...