How to Differentiate Between SUMIF and COUNTIF Functions in Excel (2 Examples)

Dataset Overview

We will use the following sample dataset to illustrate the differences:

2 Ideal Examples to Figure Out the Differences Between SUMIF and COUNTIF Functions in Excel


Example 1 – Difference in Function Argument Syntax

Let’s discuss the argument syntax for both functions:

SUMIF Function

The syntax for the SUMIF function is as follows:

=SUMIF (range, criteria, [sum_range])

Syntax of SUMIF Function as An Ideal Example to Figure Out the Differences Between SUMIF and COUNTIF Functions in Excel

From the above syntax, you will require the following arguments to perform a task with this function.

Argument Required or Optional Value
range Required Refers to the range of cells you want to evaluate based on the specified criteria.
criteria Required Can be a number, expression, cell reference, text, or function that defines which cells to add.
[sum_range] Optional Specifies the actual cells to add if you need to combine cells other than those defined in the range argument.

COUNTIF Function

The formula or syntax for the COUNTIF function is as follows:

=COUNTIF(range, criteria)

Syntax of COUNTIF Function as An Ideal Example to Figure Out the Differences Between SUMIF and COUNTIF Functions in Excel

You will require the following arguments to perform a task with this function:

Argument Required/Optional Explanation
range Required Indicates the range of cells where the function will apply the criteria for counting.
criteria Required Defines the condition or criteria for counting.

So, from the above explanation, you can see that the SUMIF function’s syntax contains an extra argument, which is the sum_range.

Read More: How to Use the Combination of COUNTIF and SUMIF in Excel


Example 2 – Difference in Showing Outputs

Let’s use the same data set and criteria to see how these functions produce different outputs:

Steps:

  • Look at the image below, which displays two separate fields showing the outputs of these functions.

  • To calculate the total sales for the criteria Marshmallow, insert the following SUMIF formula in cell D24:
=SUMIF(C5:C20,D22,D5:D20)

  • Press Enter, and the formula will add all cell values containing total sales that match the Marshmallow criteria, showing the summation as the result.

  • To count how many times the word Marshmallow appears in the given cell range, enter the following COUNTIF formula in cell D27:
=COUNTIF(C5:C20,D22)

  • After pressing Enter, the formula will provide the count.

Read More: How to Use Nested COUNTIF Function in Excel


Summary

Here’s a summary of the differences:

Factors for Comparison SUMIF Function COUNTIF Function
Argument Syntax Requires an extra sum_range in the argument. Does not require this extra argument.
Output Adds a range of cells based on a special condition or criteria. Counts the number of cells matching the given condition or criteria.

Download Practice Workbook

You can download the practice workbook from here:


Related Articles


<< Go Back to Excel COUNTIF Function | Excel Functions | Learn Excel

Get FREE Advanced Excel Exercises with Solutions!
Md. Araf Bin Jayed
Md. Araf Bin Jayed

I am Araf. I have completed my B.Sc in Industrial and Production Engineering from Ahsanullah University of Science and Technology. Currently I am working as an Excel & VBA Content Developer in Softeko. With proper guideline and aid of Softeko I want to be a flexible data analyst. With my acquired knowledge and hard work, I want to contribute to the overall growth of this organization.

We will be happy to hear your thoughts

Leave a reply

Advanced Excel Exercises with Solutions PDF

 

 

ExcelDemy
Logo