Skip to content
Free Excel Tutorials
  • Home
  • Excel For Beginners
  • Excel Intermediate
  • Advanced Excel For Experts

Data Analysis

  • How to count table columns in Excel
  • Add Outline to Data in Excel
  • What-If Analysis: Scenarios and Goal Seek in Excel
  • Filter Data Based on Date in Excel
  • How to calculate current stock or inventory in Excel

References

  • How to use Excel TRANSPOSE Function
  • How to use Excel FORMULATEXT function
  • Last row number in range
  • How to reference named range different sheet in Excel
  • Excel Advanced Lookup using Index and Match Functions

Data Validations

  • Excel Data validation require unique number
  • Excel Data validation date in specific year
  • Excel Data validation only dates between
  • Excel Data validation whole percentage only
  • Prevent invalid data entering in specific cells

Two-way summary count with COUNTIFS in Excel

by

This tutorial shows how to work Two-way summary count with COUNTIFS in Excel using the example below;

Formula

=COUNTIFS(range1,critera1,range2,critera2)

Explanation

To build a two-way summary count (i.e. summarizing by rows and columns) you can use the COUNTIFS function.

In the example shown, the formula in G5 is:

=COUNTIFS(dept,$F5,class,G$4)

How this formula works

The COUNTIFS function is designed to count things based on more than one criteria. In this case, the trick is to build a summary table first that contains one set of criteria in the left-most column, and a second set of criteria as column headings.

Then, inside COUNTIFS function, range1 is the named range “dept” (C5:C11) and the criteria comes from column F, input as the mixed reference $F5 (to lock the column). Range2 is the named range “class” (D5:D11) and the criteria comes from row 4, input as the mixed reference G$4 (to lock the row):

 =COUNTIFS(dept,$F5,class,G$4)

When this formula is copied through the table the mixed references change so that COUNTIFS will generate a count as the intersection of each “pair” of intersecting criteria.

Post navigation

Previous Post:

How to use Excel CHOOSE Function

Next Post:

Customize Ribbon In Excel

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Learn Basic Excel

Ribbon
Workbook
Worksheets
Format Cells
Find & Select
Sort & Filter
Templates
Print
Share
Protect
Keyboard Shortcuts

Categories

  • Charts
  • Data Analysis
  • Data Validation
  • Excel Functions
    • Cube Functions
    • Database Functions
    • Date and Time Functions
    • Engineering Functions
    • Financial Functions
    • Information Functions
    • Logical Functions
    • Lookup and Reference Functions
    • Math and Trig Functions
    • Statistical Functions
    • Text Functions
    • Web Functions
  • Excel VBA
  • Excel Video Tutorials
  • Formatting
  • Grouping
  • Others

Logical Functions

  • IFS function: Description, Usage, Syntax, Examples and Explanation
  • Check multiple cells are equal in Excel
  • IF with boolean logic in Excel
  • TRUE function: Description, Usage, Syntax, Examples and Explanation
  • IF, AND, OR and NOT Functions Examples in Excel

Date Time

  • Convert decimal minutes to Excel time
  • Get fiscal quarter from date in Excel
  • Get week number from date in Excel
  • Convert text timestamp into time in Excel
  • DAYS360 function: Description, Usage, Syntax, Examples and Explanation

Grouping

  • Calculate conditional mode with criteria in Excel
  • Map text to numbers in Excel
  • Group times into unequal buckets in Excel
  • If cell contains one of many things in Excel
  • Map inputs to arbitrary values in Excel

General

  • How to calculate percent change in Excel
  • Excel Ribbon Quick Overview For Beginners
  • Basic numeric sort formula in Excel
  • Count cells that do not contain many strings in Excel
  • Print Excel Sheet In Landscape Or Portrait
© 2025 xlsoffice . All Right Reserved. | Teal Smiles | Abbreviations And Their Meaning