Forum Discussion

AB_15's avatar
AB_15
Copper Contributor
Jun 10, 2023
Solved

Count with 2 criteria in one range per row

Greetings!

 

Specification: Excel 2016, Win10.

 

Context: person has # X and # Y. There are multiple persons with different XY's. It is possible for the numbers to be exactly the same in XY. 

 

Questions:

What function and criteria to use to count how many persons have identical specific XY numbers?

Is it possible to calculate all this with count functions, if's, and's? Or at least keep it in the lines of count functions. 

 

Example:

Bill and Kelly have the same X 32 and Y 56.

Criteria in this case is that X = 32 and Y = 56. (Both have to be true.) 

That is why expected result = 2.

If Kelly had a Y of 23, expected result would be 1, as criteria Y = 56 wouldn't be true.

So, the result is how many persons X = 32 and Y = 56. Names are not required.

 

I do manage to count with help of a few more cells, but I want to do it in just one cell, as it is more eye appealing and gets very long if it's a long database.

Resources