I have tried using various formulas, but I have been unable to achieve the desired output. Which is all possible permutations of given data.
Could someone please provide me with a formula or approach that can help me generate this output pattern in MS Excel?
Input:
Ram
Sham
Raj
Rahul
Ravi
Output:
Ram     Sham    Raj     Rahul   Ravi
Ram     Raj     Rahul   Ravi    Sham
Ram     Rahul   Ravi    Sham    Raj
Ram     Ravi    Sham    Raj     Rahul
Sham    Ram     Raj     Rahul   Ravi
Sham    Raj     Rahul   Ravi    Ram
Sham    Rahul   Ravi    Ram     Raj
Sham    Ravi    Ram     Raj     Rahul
Raj     Ram     Sham    Rahul   Ravi
Raj     Sham    Rahul   Ravi    Ram
Raj     Rahul   Ravi    Ram     Sham
Raj     Ravi    Ram     Sham    Rahul
Rahul   Ram     Sham    Raj     Ravi
Rahul   Sham    Raj     Ravi    Ram
Rahul   Raj     Ravi    Ram     Sham
Rahul   Ravi    Ram     Sham    Raj
Ravi    Ram     Sham    Raj     Rahul
Ravi    Sham    Raj     Rahul   Ram
Ravi    Raj     Rahul   Ram     Sham
Ravi    Rahul   Ram     Sham    Raj
I tried few permutation generator formulas but these not giving expected results:
=INDEX($A$1:$A$5,MOD((ROW()-1)*5+COLUMN()-2,5)+1)

 
     
    

 
    
