0

I have a number of columns (3+) and I would like to create all possible variants of them.

For example:

Country Product Colour
UK      Shoe    Red
US      Sock    Black
CA              White
                Red

I would then like, in each column, to see all of the possible combinations. Like:

Country Product Colour
UK  Shoe    Red
UK  Shoe    Black
UK  Shoe    White
UK  Shoe    Red
UK  Sock    Red
UK  Sock    Black
UK  Sock    White
UK  Sock    Red
US  Shoe    Red
US  Shoe    Black
US  Shoe    White
US  Shoe    Red
US  Sock    Red
US  Sock    Black
US  Sock    White
US  Sock    Red
CA  Shoe    Red
CA  Shoe    Black
CA  Shoe    White
CA  Shoe    Red
CA  Sock    Red
CA  Sock    Black
CA  Sock    White
CA  Sock    Red

All of the solutions I have seen only work with two columns, but I have anywhere from 3 to 10.

player0
  • 124,011
  • 12
  • 67
  • 124
Harry
  • 41
  • 3

1 Answers1

0

this will cover up to 15 columns:

spreadsheet

0


more stuff: https://webapps.stackexchange.com/a/131019/186471

Community
  • 1
  • 1
player0
  • 124,011
  • 12
  • 67
  • 124
  • I have 40+ total variants in 6 columns. It doesn't seem to work when the list per column is long https://docs.google.com/spreadsheets/d/1YnIuMd09pbCGF-GF02khqzFVDmdfkI1XtYBU76Vv8V0/edit?usp=sharing – Harry Oct 17 '19 at 13:48
  • well, it all depends on length of each item. Google Sheets limitation is 32000 characters – player0 Oct 17 '19 at 13:49
  • https://stackoverflow.com/a/56665668/5632629 - maybe you have same scenario (too huge dataset) – player0 Oct 17 '19 at 13:56
  • also, any reason why you repeat same colors? this way you loose columns – player0 Oct 17 '19 at 13:59
  • That was just an example. The real thing would look something like this: https://docs.google.com/spreadsheets/d/1YnIuMd09pbCGF-GF02khqzFVDmdfkI1XtYBU76Vv8V0/edit#gid=0 – Harry Oct 17 '19 at 14:11
  • For the approach for the large data set, I get this error: Text result of REPT is longer than the limit of 32000 characters. – Harry Oct 17 '19 at 14:40