Note: The other languages of the website are Google-translated. Back to English

Two-way summary counting in Excel using COUNTIFS

The COUNTIF function can be used to count the number of cells that meet a certain criterion in Excel. But sometimes, you may need to count cells based on more than one criterion. In this tutorial, we will discuss how to use the COUNTIFS function to create two-way summary count in Excel.


How to perform two-way summary counting using COUNTIFS?

As shown in the table below, supposing you want to count how many males and females there are in the given countries respectively, you can follow the below steps.

Generic Formulas

=COUNTIFS(criteria_range1, criteria1, criteria_range2, criteria2, ... )

Arguments

Criteria_range1: The first range where you want to evaluate the criteria;
Criteria1: The first criteria that define which cells to be counted.
Criteria_range2, criteria2, ...: The additional ranges and their associated criteria. It allows you to apply no more than 127 range/criteria pairs.

How to use this formula?

In this case, $D$3:$D$11 is the range1, China is the criteria1 that locates in $G3, $E$3:$E$11 is the range2, and H$2 is the cell reference containing the criteria2.

1. Select a cell to place the first result. In this case, I select cell H3.

2. Enter the below formula into it and press the Enter key to get the result.

=COUNTIFS($D$3:$D$11,$G3,$E$3:$E$11,H$2)

Note: If the criteria argument is a reference to an empty cell, the COUNTIFS function treats the empty cell as a 0 value.

3. Select the first result cell:

3.1) Drag the AutoFill Handle right to the cell to get the number of females in the same country.
3.2) Keep the row selected, and then drag the AutoFill Handle down to get the number of males and females in the other countries. See screenshot:


Related functions

Excel COUNTIF function
The Excel IF function is a statistical function in Excel which is used to count the number of cells that meet a criterion.


Related formulas

3D sum or sumif across multiple worksheets
This tutorial talks about how to sum the same range of cells across multiple consecutive or discontiguous worksheets in Excel.

Calculate running total
This tutorial explains a simple formula to help calculating running total in Excel.

Get subtotal by invoice number
This tutorial explains a formula based on the COUNTIF and SUMIF functions to get subtotal by invoice number in Excel.

Subtotal by colors
This step-by-step guide helps you perform subtotal by color with the SUMIF function.


The Best Office Productivity Tools

Kutools for Excel - Helps 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 for you.

  • 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.
  • 30-day unlimited free trial. 60-day money back guarantee. Free upgrade and support for 2 years.
Ribbon of Excel (with Kutools for Excel installed)

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, Firefox, And New Internet Explorer.
Screen Shot of Excel (with Office Tab installed)
Comments (0)
No ratings yet. Be the first to rate!
There are no comments posted here yet
Leave your comments
Posting as Guest
×
Rate this post:
0   Characters
Suggested Locations

Follow Us

Copyright © 2009 - www.extendoffice.com. | All rights reserved. Powered by ExtendOffice. | Sitemap
Microsoft and the Office logo are trademarks or registered trademarks of Microsoft Corporation in the United States and/or other countries.
Protected by Sectigo SSL