Finding Paired Items In A List

wms2011

New Member
Joined
Aug 5, 2011
Messages
1
I would appreciate any help on the following: I have extracted sales data which Sheet 1 - Column A contains the sales order number and column B contains one item on that order (A sales order can take up many rows if it has many items on it). I am trying to find paired items that are frequently ordered together. I envision a VBA script, and it would output on sheet 2 with the first item number to column A, and 2nd item number to column B and number of orders it occurs on in column C.

Example: Here is what the columns of data would be on sheet 1:
A: Order# B: Item
11111 1A
11111 1B
22222 1A
22222 1B
22222 1D
33333 1A
33333 1B
33333 1D

Sheet 2 Output of above example:
A:1st Item Number B: 2nd Item Number C:Number of Order Occurrences
1A 1B 3
1B 1D 2
1A 1D 2

To recap 1A and 1B occur 3 times on orders 11111,22222,33333. 1B and 1D as well as 1A and 1D occur on 2 orders 22222 and 33333.


Thanks again for any help on this.
 

Excel Facts

Waterfall charts in Excel?
Office 365 customers have access to Waterfall charts since late 2016. They were added to Excel 2019.

Forum statistics

Threads
1,224,599
Messages
6,179,827
Members
452,946
Latest member
JoseDavid

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