Please note my question is different from the suggested duplicate. The suggested duplicate does not show all possible variations based on the number of options, so an input of 3 can have a variation of 1, 2, and 3 of the inputs. The suggested duplicate always provides 3 inputs per variation.

Furthermore, my question also asks for variations to show all possible orders of the inputs too. The suggested duplicate always shows column A at the left most position of the output, column b in the middle of the output and column c at the left of the output.

Therefore, the suggested duplicate **does** **not** answer my question.

# Original Question

How do I go about creating a formula which takes any number of given input values, and then generates an output value with all possible ~~combinations~~ permutations based on the input values given.

For example, if the input values where as following

```
One
Two
```

The output generated should be something like this

```
One
OneTwo
Two
TwoOne
```

Here is what it should look like if 3 values are given:

Does anyone know how to do this in Excel?

I would like to be able to type in any number of input values and the input values will be any word, phrase, number, letters, or a ~~combination~~ permutation of all of those.

I have given this a try https://www.ozgrid.com/forum/forum/help-forums/excel-vba-macros/146983-all-possible-combinations-from-single-column but it does not seem to work.

In column A, if I type (one word per row):

```
One
Two
Three
```

In column B the VBA gives me (in a single cell):

```
one,two,three
```

It doesn't give me all possible ~~combinations~~ permutations, it just changes what I typed in vertically down a column, and outputs the results horizontally.

permutationsassociated with eachcombination– Gary's Student Jan 15 '19 at 0:166more comments