Cross Purchase Help

cdubs34

New Member
Joined
Jul 26, 2011
Messages
34
Hello,

I am trying to get at some cross buying behavior from a large data set that I have. Here is a simple, example of the data I have:[TABLE="width: 500"]
<tbody>[TR]
[TD]Name[/TD]
[TD]Product[/TD]
[/TR]
[TR]
[TD]John
[/TD]
[TD]Brand A[/TD]
[/TR]
[TR]
[TD]Mark[/TD]
[TD]Brand B[/TD]
[/TR]
[TR]
[TD]John[/TD]
[TD]Brand C[/TD]
[/TR]
[TR]
[TD]Amy[/TD]
[TD]Brand A[/TD]
[/TR]
[TR]
[TD]Amy[/TD]
[TD]Brand D[/TD]
[/TR]
[TR]
[TD]Amy[/TD]
[TD]Brand C[/TD]
[/TR]
</tbody>[/TABLE]

And then this is my desired output:

[TABLE="width: 500"]
<tbody>[TR]
[TD][/TD]
[TD]Brand A[/TD]
[TD]Brand B[/TD]
[TD]Brand C[/TD]
[TD]Brand D[/TD]
[/TR]
[TR]
[TD]Brand A[/TD]
[TD][/TD]
[TD][/TD]
[TD]<style><!--table {mso-displayed-decimal-separator:"\."; mso-displayed-thousand-separator:"\,";}@page {margin:.75in .7in .75in .7in; mso-header-margin:.3in; mso-footer-margin:.3in;}td {padding-top:1px; padding-right:1px; padding-left:1px; mso-ignore:padding; color:black; font-size:12.0pt; font-weight:400; font-style:normal; text-decoration:none; font-family:Calibri, sans-serif; mso-font-charset:0; mso-number-format:General; text-align:general; vertical-align:bottom; border:none; mso-background-source:auto; mso-pattern:auto; mso-protection:locked visible; white-space:nowrap; mso-rotate:0;}--></style>[TABLE="width: 87"]
<colgroup><col width="87" style="width:65pt"> </colgroup><tbody>[TR]
<!--StartFragment--> [TD="width: 87"]The output I am looking for in this cell for example would be the number of people that buy both Product A and Product C. So in this example it would be 2 because John and Amy bought both these products[/TD]
<!--EndFragment--> [/TR]
</tbody>[/TABLE]
[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Brand B[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Brand C[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Brand D[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]

There is a ton of data in my actual worksheet so a formula that would make it easy/efficient to get to the desired output would be great. Thanks very much.
 

Excel Facts

Whats the difference between CONCAT and CONCATENATE?
The newer CONCAT function can reference a range of cells. =CONCATENATE(A1,A2,A3,A4,A5) becomes =CONCAT(A1:A5)

Forum statistics

Threads
1,223,911
Messages
6,175,323
Members
452,635
Latest member
laura12345

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