|Are you trying to create 99 sets of 1 - 9, with each set sorted randomly?|
If so, it can be done without a macro.
In A1, enter this formula and drag it down to A9. Ignore the #N/A errors for now.
In A10, enter this formula and drag it down to A18:
A1:A9 should now contain a random set of 1 - 9
Now, select A1:A18 and drag it across to Column CU which will give you 99 sets of randomly sorted 1 - 9.
Note that since RAND() is volatile, each time the sheet recalculates you will get a different 99 sets of numbers. If you need to lock in a set, select A1:CU9 and do a Copy...PasteSpecial...Values.
You can actually put the RAND() function cells anywhere you want as long as you reference them correctly in the INDEX formula. In other words, you can "hide them" someplace else in the workbook if you want.
Click Here Before Posting Data or VBA Code ---> How To Post Data or Code.