In this article, we will learn how to count rows with criteria SUMPRODUCT in Excel.
Scenario:
In simple words, while working data, sometimes we need to count the cells where 2 ranges meet criteria. The conditional count can be done using COUNTIF function but this is not the only function that can do so. SUMPRODUCT function is a versatile function that can be used to count with criteria, sometimes even better than countif function.
How to solve the problem?
For this article we will be required to use the SUMPRODUCT function. Now we will make a formula out of these functions. Here we are given two ranges data and we need to count the values where the formula satisfies criteria.
Generic formula:
range1 : 1st range
range2 : 2st range
operator : criteria, condition given as operator between the 2 ranges
Example:
All of these might be confusing to understand. So, let's test this formula via running it on the example shown below.
Here we have the record for the last 7 big matches of Premier League Fan Clubs.
We have the record for the last 7 matches having Home team, Against team, Home scored & opponent scored goals.
Firstly, we need to find the count of games won at home by any team.
Now we will use the following formula to get the count of games who won at home.
Use the Formula:
E5:E11 : 1st range, home scored goals
F5:F11 : 2st range, opponent scored goals
> : criteria, condition given as greater than the operator
Explanation:
Here the range is given as cell reference. Press Enter to get the count.
As you can see the total matches where the home team had the advantage and won are 4 matches.
The above example was easy. So to make it interesting we will count how many matches a team won in the whole data.
Firstly, we need to find the count of games won at home by any team.
Now we will use the following formula to get the count of games, Man. United won.
Use the Formula:
Explanation:
Here the range is given as cell reference. Press Enter to get the count.
As you can see the total matches where the Man. The United team won 2 matches.
Here are some observational notes shown below.
Notes:
Hope this article about how to Return Count if with SUMPRODUCT in Excel is explanatory. Find more articles on SUMPRODUCT functions here. Please share your query below in the comment box. We will assist you.
Related Articles
How to use the SUMPRODUCT function in Excel: Returns the SUM after multiplication of values in multiple arrays in excel.
COUNTIFS with Dynamic Criteria Range : Count cells dependent on other cell values in Excel.
COUNTIFS Two Criteria Matches: Count cells matching two different criteria on the list in excel.
COUNTIFS With OR For Multiple Criteria : Count cells that have multiple criteria that match using the OR function.
The COUNTIFS Function in Excel : Count cells dependent on other cell values.
How to Use Countif in VBA in Microsoft Excel : Count cells using Visual Basic for Applications code.
How to use wildcards in excel : Count cells matching phrases using the wildcards in excel
Popular Articles
50 Excel Shortcuts to Increase Your Productivity
If with conditional formatting
Convert Inches To Feet and Inches in Excel 2016
Join first and last names in excel
Count cells that match either A or B
The applications/code on this site are distributed as is and without warranties or liability. In no event shall the owner of the copyrights, or the authors of the applications/code be liable for any loss of profit, any problems or any damage resulting from the use or evaluation of the applications/code.