Frequency Analysis for all Combinations of Data Across Multiple Columns

sakendrick

New Member
Joined
Mar 21, 2007
Messages
22
I've seen a few solutions for simple versions of the ask on different boards, but haven't found one that solves my need. I'm trying to find the most frequent combination of products owned across all our customers. But these are not unique combinations. For example 80% of my customers may have Product 1. 20 % of my customers may have product 1 and 2... but that includes some of those counted n the first 80%. 10% of my customers may have 1 & 2 and 3, which includes customers counted in the first two frequencies. Hope that makes sense. Added a mini sheet to show what my data looks like and a portion of the expected outcome. Hoping there's a way to use features or code this frequency analysis.

Frequency Analysis.xlsx
DEFGHIJKLMNO
7Product 1Product 2Product 3Product 4Product 5Product 6Product 7
8Cust 111Product 180%
9Cust 21111Product 1 & 220%
10Cust 311Product 1 & 2 & 310%
11Cust 411Product 1 & 333%
12Cust 5111Product 2 & 320%
13Cust 61...So on
14Cust 711...and so on
15Cust 811
16Cust 911
17Cust 1011
188343301
Sheet1
Cell Formulas
RangeFormula
O9O9=20%
E18:K18E18=COUNT(E8:E17)
 
I think it worked! I also realized the percent calc had the number of rows (customers) hardcoded to 10... so I corrected that after it ran. Thanks a bunch!
 
Upvote 0

Excel Facts

Copy formula down without changing references
If you have =SUM(F2:F49) in F50; type Alt+' in F51 to copy =SUM(F2:F49) to F51, leaving the formula in edit mode. Change SUM to COUNT.
Oh great. I was about to re-work the code. But if you got it to work, that's awesome.
 
Upvote 0
@lrobbo314 what are the chances this should be able to run on 350+ columns and 300 rows? :)...
I'm trying it, but not sure how long I shoudl waith.
well... guess this is my answer. I have a pretty decent system too.
1673882052778.png


1673882083418.png
 
Upvote 0
I was able to reduce my table down to 120 columns but same error as I believe the Array reaches it's max limits. Not sure if any other approoaches.
 
Upvote 0

Forum statistics

Threads
1,215,455
Messages
6,124,937
Members
449,196
Latest member
Maxkapoor

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