I am wanting to generate data for all permutations of n variables each of which can have any value from 1 through j inclusive. For example, for n=8 variables and j=7 values (that is, 1,2,3,4,5,6,7) the number of permutations with replacement will equal 7 to the 8th power, or 7*7*7*7*7*7*7*7 = 5,764,801 permutations. Note that I'm after permutations and not combinations. Ideally I'm wanting a macro where n and j can take on any value but I would settle for a macro where n = 10 and j = 7.
Any help would be greatly appreciated.
Jonathon