0

I have a table which contains 13.931 rows and 2 columns, the first column is SKU's, second is Options (Size, Colour, etc..);

  • SKU Option
  • 0001 Size:S
  • 0001 Size:M
  • 0001 Size:L
  • 0001 Size:XL
  • 0001 Colour:Red
  • 0001 Colour:Blue
  • 0002 Size:S
  • 0002 Size:M
  • 0002 Size:L
  • 0002 Colour:Navy
  • 0002 Leg:G

and goes on like this. What I need to do is generate every combination of these options (there are 7 option types in total; some SKU's has 2 types some has 4, some non) within SKU's, so it'll be like this;

  • SKU Option
  • 0001 Size:S;Colour:Red
  • 0001 Size:M;Colour:Red
  • 0001 Size:L;Colour:Red
  • 0001 Size:XL;Colour:Red
  • 0001 Size:S;Colour:Blue
  • 0001 Size:M;Colour:Blue
  • 0001 Size:L;Colour:Blue
  • 0001 Size:XL;Colour:Blue
  • 0002 Size:S;Colour:Navy;Leg:G
  • 0002 Size:M;Colour:Navy;Leg:G
  • 0002 Size:L;Colour:Navy;Leg:G

I can seperate Option column into 2 for option types and option values if it makes it easier.

My question is: Is it doable using macros? Because it is going to be a huge pain if I manually do these.

  • `My question is: Is it doable using macros?` Answer: Yes, most likely. Stack Overflow is not a code for me service. Use array or dictionary and lots of loops. – Scott Craner Apr 27 '16 at 15:06
  • Although not the same, [here](http://stackoverflow.com/q/36824503/2923617)'s a very similar question. It might put you on the right track. – NiH Apr 27 '16 at 15:12
  • 1
    I just notice that the link I posted was actually your question! Please put in some effort! Starting from the answers provided there, you should be able to figure it out or at least give it a try. Come back here when you run into a specific issue with your own solution and everyone here will be more than happy to help. – NiH Apr 27 '16 at 15:33

0 Answers0