Tip: Other languages are Google-Translated. You can visit the English version of this link.
Log in
x
or
x
x
Register
x

or

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.
doc count cells equal to 1 doc count cells equal to 2

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:
doc count cells equal to 3

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:
doc count cells equal to 4

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:
doc count cells equal to 5

Sample File

doc sampleClick to download sample file


Relative Formulas


Excel Productivity Tools

Ribbon of Excel (with Kutools for Excel installed)

300 Advanced Features Help You To Stand Out From Crowd

Would you like to complete your daily work quickly and perfectly? Kutools for Excel brings 300 powerful advanced features (Combine workbooks, sum by color, split cell contents, convert date, and so on...) and save 80% time.

  • Designed for 1500 work scenarios, helps you solve 80% Excel problems.
  • Reduce thousands of keyboard and mouse clicks every day, relieve your tired eyes and hands.
  • Become an Excel expert in 3 minutes. No longer need to remember any painful formulas and VBA codes.
  • 60-day unlimited free trial. 60-day money back guarantee. Free upgrade and support for 2 years.

Screen Shot of Excel (with Office Tab installed)

Brings Efficient Tabs to Office (include Excel), Just Like Chrome, Firefox, And New IE

  • Office Tab Increases your productivity by 50% when viewing and editing multiple documents.
  • Reduce hundreds of mouse clicks for you every day, say goodbye to mouse hand.
  • One second to switch between dozens of open documents!
Say something here...
symbols left.
You are guest ( Sign Up? )
or post as a guest, but your post won't be published automatically.
Loading comment... The comment will be refreshed after 00:00.

Be the first to comment.