Jump to content
Macro Express Forums

Repeat With Random Variable Between 1-10


Markter

Recommended Posts

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

Link to comment
Share on other sites

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

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...