Excel challenge: Which combinations do columns have, and how many

snezana

New Member
Joined
Sep 4, 2014
Messages
20
Hi all,

So I have a nice challenge that I can't solve since I'm not a big excel expert.. hope someone can help me out!

So i have this product that is being sold. And a single product code (let's say the code is 0001) can have different entries in the columns that follow. E.g. if we sell a product with code 0001, there are 8 different extra options for that product that the consumer can buy. Sometimes people will choose the simple version of product 0001, but they can mix and match what they want added. e.g what type of material the product is made of, whether it can be adjusted yes or no, whether it has a expensive fabric or not... these options are reflected in columns 'Option 1' up until 'Option 8'.

Now what I need to find out is, for a particular product (here, 0001), which combinations of extra options appear, and how many times. I've made a hypothetical table below as an example to work with, but the actual data set would probably have 1000 rows for product 0001 alone.

As you can see there are many different options, and within those options there are a set number of options (which fortunately are always written in the same way so they are exact matches). I would like to create a list from this data saying, e.g.:

Combination name Combination content Number of times appeared
Combination 1 iron; 1; option 1.moves up; yes; regular; height and width adjustment; synchroon blokkering elke posi; partial5
Combination 2iron, plastic; 1; option 1, moves up; no; regular; height adjustment; synchroon blokkering elke posi; double6
Combination 3
Combination 4
etc...

<tbody>
</tbody>

So, it should (1) automatically make a list of combinations to show me WHICH combinations there are in the first place, and (2) then count the number of times that combination appear in the data set. I wouldn't be surprised if there were 20 different combinations.

Option 1Option 2Option 3Option 4Option 5Option 6Option 7Option 8
iron1option 1, moves upyesregularheight and width adjustmentsynchroon blokkering elke posipartial
iron, plastic1option 1, moves upnoregularheight adjustmentsynchroon blokkering elke posidouble
iron, plastic1option 1, moves upnoregularheight adjustmentsynchroon blokkering elke posinone
other1option 1, moves downnoregularheight and width adjustmentsynchroon blokkering elke posinone
other1option 1, moves upnoregularheight and width adjustmentsynchroon blokkering elke posinone
other1option 2, moves upnoregularheight and width adjustmentsynchroon blokkering elke posinone
other2option 1, moves downnoregularheight and width adjustmentsynchroon blokkering elke posinone
soft2option 2, moves upnoregularheight and width adjustmentsynchroon blokkering elke posinone
soft2option 1, moves upnoregularheight and width adjustmentsynchroon blokkering elke posinone
soft2option 1, moves upnospecialheight and width adjustmentsynchroon blokkering elke posipartial
soft2option 3yesspecialheight adjustmentsynchroon blokkering elke posipartial
soft2option 3yesspecialheight adjustmentsynchroon blokkering elke posipartial
soft3option 3yesspecialheight adjustmentsynchroon blokkering elke posipartial
soft3option 5yesspecialheight adjustmentsynchroon blokkering elke posipartial
iron, plastic3option 6yesspecialheight adjustmentsynchroon blokkering elke posidouble
iron, plastic3option 7yesspecialheight adjustmentsynchroon blokkering elke posidouble
iron, plastic3option 8yesspecialheight adjustmentsynchroon blokkering elke posidouble
iron3option 9yesspecialheight adjustmentsynchroon blokkering elke posidouble

<tbody>
</tbody>
 
Last edited:

Excel Facts

How to calculate loan payments in Excel?
Use the PMT function: =PMT(5%/12,60,-25000) is for a $25,000 loan, 5% annual interest, 60 month loan.
Ok, and if you're interested in the SQL method it's very easily done in Access with the query wizard, as well as Excel (Microsoft Query, which I learned about from Fazza, shown below):

fr8vSpu.png


which can appear in the spreadsheet as:

afSncxy.png
 
Upvote 0

Forum statistics

Threads
1,215,201
Messages
6,123,621
Members
449,109
Latest member
Sebas8956

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