Need help with vba

  • MODERATOR NOTICE: This topic has also been posted on other sites and may already have an answer elsewhere. Please take this into consideration when answering this question

    generate 100 random numbers of which 50 should be even numbers and 50 odd numbers


    Hi I need to generate 100 random numbers of which 50 should be even numbers and 50 odd numbers, they should be stored in an array as follows 0 to 49 even numbers, 50 to 99 odd numbers.


    Then I need to mix the order of the array.

    Can someone help me.

  • rory

    Added the Label Cross Post
  • Just a statistical observation. Might not be considered statistically random if the distribution of numbers is predetermined, so there is error here if stating random numbers are being used. But if needed for random allocation to say 100 staff members, I guess this is ok.

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!