I'm Mathi. I'm moderate user of Excel. I need help to generate permutations in excel 2007. I've tried with permut formula but failed to find the solution. I need to generate permutations for digits (4bytes) as below.

scenario...
1111 - 1111 (1 permutations)
0001 - 0001 0010 0100 1000 (4 permutations)
0011 - 0011 0101 0110 1001 1010 1100 (6 permutations)
0211 - ....(12 permutations)
3210 - ....(24 permutations)

Expect..(in excel separated by columns)


0001 0001 0010 0100 1000
0002 ....
0003 ....
0004 ....
.
9530 9530 9503 9350 9305 9053 9035 5930 5903 ... (24 permutations)
.
9998 9998 9989 9899 8999
9999 9999

Please help me to generate permutations as shown above.