count values where two columns match
i am trying to count the number of matching pairs of values in two columns.
eg:
Column A Column B
1910 760
1910 810
1910 810
1990 760
1990 760
the outcome of the above that i am looking for is as follows
1910 x 760 = 1
1910 x 810 = 2
1990 x 760 = 2
can someone please help me with a formula that will give me these count summaries?
Regards
Comments

Hello,
Try a COUNTIFS statement; example:
=COUNTIFS([Column A]:[Column A], 1910, [Column B]:[Column B], 760)
You'll want to create a separate COUNTIFS formula for each pair combination that you want to count.
More on COUNTIFS here: https://help.smartsheet.com/function/countifs

awesome, thanks Shaine

follow up question...
what if the number of variables are significant? in this case we are dealing with measurements and although the width measurements are more of a finite range, the height measurements will vary enourmously. would i then have to have a count if statement for each millimetre difference???

follow up question...
what if the number of variables are significant? in this case we are dealing with measurements and although the width measurements are more of a finite range, the height measurements will vary enourmously. would i then have to have a count if statement for each millimetre difference???

Hi Shane,
Can you please help me with my follow up questions on this topic re multiple variables.
Regards
Blair

Hi Blair,
Sorry—for some reason I didn't get notified about your reply!
You may be able to use comparative operators to count ranges of values. An example of this in a COUNTIF function is as follows:
=COUNTIF(Height:Height, > 25)
You can expand this to COUNTIFS but creating range of values to count between:
=COUNTIFS(Height:Height, > 25, Height:Height, < 250)
This formula will count any value greater than 25 but less than 250. More on COUNTIFS and acceptable operators here: https://help.smartsheet.com/function/countifs
Help Article Resources
Categories
Check out the Formula Handbook template!