CountIf for two columns
One way:
Assume your columns are A & B. Further assume your criteria are in
D1 (for column A) and E1 (for column B):
=SUMPRODUCT(--(A1:A1000=D1),--(B1:B1000=E1))
In article ,
"Yakimoto" wrote:
I have two columns populated with different values.
I would like to count all the cells pair having specific values, i.e. like
countif function, but for both cells.
For now I am doing this concatenating both columns and after that performing
CountIf over resulting column.
Another way is to write a piece of code looping and counting, but it seems
too much for such a simple thing.
Is there any other way of doing that? Without intermediate steps, only using
one formula?
Thanks,
Yakimo
|