## Excel formula: Count cells equal to

This article will focus on the Excel formulas for counting the cells which are exactly equal to a text string you specify or partial equal to the given text string as below screenshots shown. Firstly, it will explain the formula syntax and argument, the provides examples for you to better understand.

Count cells exactly equal to

Count cells partial equal to

### Count cells exactly equal to

If you want to count cells exactly match a given criterion, you can choose the COUNTIF function or the SUMPRODUCT (combine with the EXACT function) function to count cells exactly equal to without case sensitive or with case sensitive.

#### Count cells exactly equal to without case sensitive

Generic formula:

 COUNTIF(range, criteria)

Arguments

 Range: Required, the cells you want to count that match to criteria from. Criteria: Required, the criteria that the cells need to match to while counting.

Example:

For instance, here is a list of names, now you want to count the number of cells which exactly match to “Lily James”, please use below formula:

 =COUNTIF(B3:B7,D3)

Or

 =COUNTIF(B3:B7,"Lily James")

In above formulas, B3:B7 is the range you want to count cells from, D3 or “Lily James” is the criteria cells need to match to.

The press Enter key to get the counted result, see screenshot shown:

#### Count cells exactly equal to with case sensitive

Generic formula:

 SUMPRODUCT((--EXACT(value,range))

Arguments

 Range: Required, the cells you want to count that match to criteria from. Value: Required, the criteria that the cells need to match to while counting.

Example:

Here is a list of product names, now you want to count the number of cells which exactly match to “AA-1” with case sensitive, please use below formula:

 =SUMPRODUCT(--EXACT(D11,B11:B15))

Or

 =SUMPRODUCT(--EXACT("AA-1",B11:B15))

In above formulas, B11:B15 is the range you want to count cells from, D11 or “AA-1” is the criteria counted cells need to match to.

The press Enter key to get the counted result, see screenshot shown:

### Count cells partial equal to

If you want to count cells particle match to a specific text string, you also can use the COUNTIF function to deal with this job.

Please take reference to above part to understand the formula syntax and argument of the COUNTIF function. Here I will provide a specific example to explain how to count cells particle equal to given value.

Example:

Here is a list of fruits, and now the job is to count the cells which contain “an”. Please use below formula:

 =COUNTIF(B3:B7,D3)

Or

 =COUNTIF(B3:B7,"*an*")

In above formulas, B3:B75 is the range you want to count cells from, D3 or “*an*” is the criteria counted cells need to match to. * is the wildcard to indicate any string, in this case, *an* means that the cell contain the string ”an”.

The press Enter key to get the counted result, see screenshot shown:

### The Best Office Productivity Tools

#### Kutools for Excel - Helps You To Stand Out From Crowd

 🤖 Kutools AI Aide: Revolutionize data analysis based on: Intelligent Execution   |  Generate Code  |  Create Custom Formulas  |  Analyze Data and Generate Charts  |  Invoke Kutools Functions… Popular Features: Find, Highlight or Identify Duplicates  |  Delete Blank Rows  |  Combine Columns or Cells without Losing Data  |  Round without Formula ... Super VLookup: Multiple Criteria  |  Multiple Value  |  Across Multi-Sheets  |  Fuzzy Lookup... Adv. Drop-down List: Easy Drop Down List  |  Dependent Drop Down List  |  Multi-select Drop Down List... Column Manager: Add a Specific Number of Columns  |  Move Columns  |  Toggle Visibility Status of Hidden Columns  |  Compare Columns to Select Same & Different Cells ... Featured Features: Grid Focus  |  Design View  |  Big Formula Bar  |  Workbook & Sheet Manager | Resource Library (Auto Text)  |  Date Picker  |  Combine Worksheets  |  Encrypt/Decrypt Cells  |  Send Emails by List  |  Super Filter  |  Special Filter (filter bold/italic/strikethrough...) ... Top 15 Toolsets:  12 Text Tools (Add Text, Remove Characters ...)  |  50+ Chart Types (Gantt Chart ...)  |  40+ Practical Formulas (Calculate age based on birthday ...)  |  19 Insertion Tools (Insert QR Code, Insert Picture from Path ...)  |  12 Conversion Tools (Numbers to Words, Currency Conversion ...)  |  7 Merge & Split Tools (Advanced Combine Rows, Split Excel Cells ...)  |  ... and more

Kutools for Excel Boasts Over 300 Features, Ensuring That What You Need is Just A Click Away...

#### Office Tab - Enable Tabbed Reading and Editing in Microsoft Office (include Excel)

• One second to switch between dozens of open documents!
• Reduce hundreds of mouse clicks for you every day, say goodbye to mouse hand.
• Increases your productivity by 50% when viewing and editing multiple documents.
• Brings Efficient Tabs to Office (include Excel), Just Like Chrome, Edge and Firefox.