Most frequent combinations

tigerzen

Board Regular
Joined
Mar 8, 2023
Messages
165
Office Version
  1. 365
Platform
  1. Windows
Trying to find the most popular combinations as per the spreadsheet. The desired output should list all the unique ordered combinations, eg Prod A and Prod B is equivalent to Prod B and Prod A. Looking for an Excel 2019 solution with formulae and ok to have helper columns.

Book1
BC
1CustomerSales
2FredProd A, Prod C, Prod B
3HarryProd C, Prod A
4KenProd C, Prod A
5VicProd A, Prod C
6NellieProd B, Prod A, Prod C
7SallyProd A
8JoeProd B, Prod A
9TedProd B, Prod C, Prod A
10
11Desired outputCount from largest to least
12Prod A, Prod B, Prod C3
13Prod A, Prod C3
14Prod A, Prod B1
15etc
Sheet11
 

Excel Facts

What do {} around a formula in the formula bar mean?
{Formula} means the formula was entered using Ctrl+Shift+Enter signifying an old-style array formula.
Hi

Cell D2
=BYROW(C2:C9,LAMBDA(k,TEXTJOIN("", "",,SORT(TEXTSPLIT(k,"", ""),,,1))))


Cell B12
=UNIQUE(D2#)


Cell C12
=COUNTIF(D2#,UNIQUE(D2#))
 
Upvote 0
Hi

Cell D2
=BYROW(C2:C9,LAMBDA(k,TEXTJOIN("", "",,SORT(TEXTSPLIT(k,"", ""),,,1))))


Cell B12
=UNIQUE(D2#)


Cell C12
=COUNTIF(D2#,UNIQUE(D2#))
Thanks ISY, I'm playing around with your solution but I'm getting error messages in D2, ie VALUE errors. I 'll keep trying to see if I can get this to work.
 
Upvote 0
There are some extra quotes in the formula, try
Excel Formula:
=BYROW(C2:C9,LAMBDA(k,TEXTJOIN(", ",,SORT(TEXTSPLIT(k,", "),,,1))))
 
Upvote 0
Glad we could help & thanks for the feedback.
 
Upvote 0

Forum statistics

Threads
1,215,364
Messages
6,124,507
Members
449,166
Latest member
hokjock

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top