Forum Discussion

Pasquale_Capone's avatar
Pasquale_Capone
Copper Contributor
Jul 10, 2022

More frequently couple in columns

Hello, how can I do to obtain the couple of numbers that occur more frequently in two distinct  columns in a range of cells:

i.e., I have column A and column B with their numbers, I want to know which couple of numbers occur in rows more frequently, the second more frequently and so on. Thanks for attention and best regards.

  • Pasquale_Capone 

    Let's say the data are in A2:B101.

    Create the following formula in C2, then fill down.

     

    =COUNTIFS(A$2:A$101,A2,B$2:B$101,B2)

     

    Sort the data on column C in descending order. Columns A and B will show the most frequently occurring combinations at the top.

     

    See the attached sample workbook for a way of returning the unique combinations in descending order of frequency (Microsoft 365 and Office 2021 only).

    • skiddo24's avatar
      skiddo24
      Copper Contributor

      HansVogelaar 

       

      FYI :  This solution also works in 2016.

      This solution is exactly what I was looking for.  Thank you.

Resources