Excel allows a user to create a summary count of non-blank categories using the **COUNTIFS** function. This step by step tutorial will assist all levels of Excel users in creating a summary count of non-blank categories.

*Figure 1. The result of the COUNTIFS function*

**Syntax of the COUNTIFS Formula**

The generic formula for the COUNTIFS function is:

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

The parameters of the COUNTIFS function are:

**criteria_range1, criteria_range2**– ranges where we want to apply our criteria**criteria1, criteria2**– a criteria in criteria ranges which we want to count.

**Setting up Our Data for the COUNTIFS Function**

* Figure 2. Data that we will use in the COUNTIFS example*

In the first data table, we have 3 columns: “Product” (column B), “Date” (column C) and “Sales Amount” (column D). In the summary table (F2:G5), we want to count days with sales for each product.

**Create a Summary Count of Non-blank Categories with the COUNTIFS table**

In our example, we want to count for each product days with sales (where sales amount is not blank). Therefore, the first criteria will be a product and the second sales amount different than blank.

The formula looks like:

**=COUNTIFS($B$3:$B$20, F3, $D$3:$D$20, "<>")**

The parameter** criteria_range1** is $B$3:$B$20 and the **criteria1** is in the cell F3. The parameter **criteria_range2** is $D$3:$D$20 and the **criteria2** is “<>”.

We must fix both criteria ranges, as they are not changing when we copy the formula across the cells. For criteria1 we must fix the column, as only the row is changing.

To apply the COUNTIFS function, we need to follow these steps:

- Select cell G3 and click on it
- Insert the formula:
`=COUNTIFS($B$3:$B$20, F3, $D$3:$D$20, "<>")`

- Press enter
- Drag the formula down to the other cells in the row by clicking and dragging the little “+” icon at the bottom-right of the cell to the right.

* Figure 3. Creating the summary count of non-blank categories with the COUNTIFS*

For Product A, there are 3 days with Sales amount (1/7/2019, 1/9/2019 and 1/12/2019). Therefore, the result in the cell G3 is 3.

Most of the time, the problem you will need to solve will be more complex than a simple application of a formula or function. If you want to save hours of research and frustration, try our live Excelchat service! Our Excel Experts are available 24/7 to answer any Excel question you may have. We guarantee a connection within 30 seconds and a customized solution within 20 minutes.

## Leave a Comment