How to Count Cells Containing Specific Text in Excel Using COUNTIF

In business analytics, human resources, and inventory management, spreadsheets are filled with descriptive text columns such as order statuses, customer feedback categories, or product descriptions. When auditing these lists, you frequently need to determine how many times a particular department, word, or status keyword appears across hundreds of rows.

Microsoft Excel’s COUNTIF function provides a fast and flexible way to tally exact matches as well as partial text strings using wildcard operators.

Method 1: Counting Exact Text Matches

If you want to count cells that contain an exact text string (such as counting how many rows say “Approved”):

  1. Click on the cell where you want your summary count to appear.
  2. Enter the formula, replacing B2:B100 with your data range and "Approved" with your target word:
    =COUNTIF(B2:B100, "Approved")
  3. Press Enter. Excel counts every cell in that range that matches the word exactly (case-insensitive).

Method 2: Counting Partial Text Using Wildcards (*)

Often, target words do not appear alone; they may sit inside longer sentences, codes, or descriptions (for example, finding “Urgent” inside “Order #1042 – Urgent Delivery”). To count any cell containing the word anywhere in its contents:

  1. Use the asterisk wildcard (*) before and after your search term:
    =COUNTIF(B2:B100, "*Urgent*")
  2. The asterisks instruct Excel to match any sequence of characters before and after the keyword.

Method 3: Referencing a Cell Containing the Search Keyword

To make your dashboard dynamic so users can type a keyword into an input cell without modifying the formula:

  1. Assume your search keyword is typed in cell D1.
  2. Enter this formula using the concatenation operator (&):
    =COUNTIF(B2:B100, "*" & D1 & "*")
  3. Whenever you type a new search word into D1, the formula updates the total count immediately.

Mastering text counting with COUNTIF enables fast data validation, issue tracking, and automated summaries across large organizational spreadsheets.

Get the best tech tips delivered straight to your inbox.

Join thousands of readers mastering Apple, Google, Microsoft, and Linux.