Markter Posted March 6, 2006 Report Share Posted March 6, 2006 Good day, I am trying to create a macro that repeats 10 times, each loop it assigns a variable a random number between 1-10. But it can not use the same number twice. It needs to use every number between 1 and 10. Is there an easy way to do this??? Thanks! Mark Quote Link to comment Share on other sites More sharing options...
kevin Posted March 6, 2006 Report Share Posted March 6, 2006 The attached sample macro will generate a selected number of random numbers and ensure that each of them is unique. This is not exactly what you are asking for but you should be able to modify the macro to fit your needs or, at a minimum, it should give you some ideas about how to accomplish what you want. You may be able to simply modify it to generate 10 unique random numbers and have it do what you want. GenerateUniqueRandomNumbers.mxe Quote Link to comment Share on other sites More sharing options...
Markter Posted March 7, 2006 Author Report Share Posted March 7, 2006 Thanks Kevin, I was able to get it to work with your help. Mark Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.