Advertisement
Money

Read Excel Tips Such As How To Count Records That Match A Criteria At BrightHub.com

Learn how to use the COUNTIF function to find out how many items in an Excel list satisfy a certain condition.

By Mr Excel
Desk Money
Reading time 2 min read
Word count 299
Home Business Software
Read Excel Tips Such As How To Count Records That Match A Criteria At BrightHub.com
Advertisement
Quick Take

Learn how to use the COUNTIF function to find out how many items in an Excel list satisfy a certain condition.

On this page

Problem: You have a large dataset, as shown in Fig. 562. You want to count the number of records that meet a certain criteria. What function should you use?

Note: Click any image below to see a larger view of that figure.

Advertisement

Strategy: Use the COUNTIF function. This function requires two arguments. The first is a range of cells that you want to test. The second is a test. To count the records where the gender is “M”, use =COUNTIF(B2: B57, “M”), as shown in Fig. 563.

Note that the second argument of “M” indicates tells Excel to count records that are equal to M. Since this function is not case sensitive, the function will count cells with M or m.

Advertisement

If you want to count the records where the age is a specific number, as shown in Fig. 564, then you can write the formula either with or without quotes around the number:

=COUNTIF(C2:C999,32)

Advertisement

=COUNTIF(C2:C999,“32”)

The criteria can look for items that are below or above a certain number:

Advertisement

=COUNTIF(C2:C999,“21”)

Summary: To count how many cells contain certain criteria, use the COUNTIF function by entering the two criteria it needs, which cells to count, and what to count.

Advertisement

Functions Discussed: =COUNTIF()

See all Microsoft Excel tips

Advertisement

Images

Fig. 563

Fig. 564

Advertisement

References and Additional Resources

If you’re looking for more tips and tutorials, check out 91 Tips for Calculating With Microsoft Excel . This collection of easy-to-follow guides shows how to customize charts and graphs, different ways to make complex spreadsheets easier to update, and even how to play games like Craps in Excel. If you don’t find what you’re looking for, leave a note in the Comments section below and let us know.

Other Resources:

Advertisement

Microsoft Excel Official Site, https://office.microsoft.com/en-us/excel/

Bill Jelen, Microsoft Excel 2010 In Depth, Available from Amazon.com .

Advertisement
Keep Exploring

More from Money

Filed under
Home Business
More topics
Software
Advertisement