Hello everyone,
I performed a small research but could not identify a code for my need.
I want to create a sampling file in excel, that will have the population size in cell b2, and the required sample size in cell b5. (The required sample is to be up to 40.)
I want to create a macro that will read the population size and sample (from 1 to the population size) random numbers by the required times (cell b5) without duplication. The output of the random numbers is to be included in the area of f2:f41 (If required sample is less than 40, e.g. 5, then only fill cells f2:f6).
Could you please assist me?
Thank you very much for your input.
I performed a small research but could not identify a code for my need.
I want to create a sampling file in excel, that will have the population size in cell b2, and the required sample size in cell b5. (The required sample is to be up to 40.)
I want to create a macro that will read the population size and sample (from 1 to the population size) random numbers by the required times (cell b5) without duplication. The output of the random numbers is to be included in the area of f2:f41 (If required sample is less than 40, e.g. 5, then only fill cells f2:f6).
Could you please assist me?
Thank you very much for your input.