• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

How to Create Random Samples with Multiple

Ruthie

New Member
Hey Chandoozers! I thought I'd come to you with my question today.

I know how to use the excel funciton, =rand(), to create randomized values by pasting those values, and sorting to get my random selections. However, that only works for when I have one set of data/product:

Product PO#
A 1142710913
A 1201607521
A 1270924912
A 1326295082
A 1458653668

How would I create random samples when my file contains multiple Products? Let's say for sales listings of Products A, B, C, D, & E, I want excel to determine 5 samples from each for quality assurance. Is this possible?

Product PO#
A 1142710913
A 1458653668
B 1057123063
B 1790199244
C 1172959626
C 1575723981
D 1022329354
D 1564678761
E 1111241292
E 1415930760

See attached sample file I created.

With much thanks,

Ruthie
 

Attachments

  • Test File - For Creating Random Samples.xlsx
    20.7 KB · Views: 4
Narayan-

Thank you for your response. I may not have communicated this properly. Let's say I just had the "data" tab. How would you use all of that to get 5 random samples for each widget? See new file.
 

Attachments

  • Test File - For Creating Random Samples_2.xlsx
    18.5 KB · Views: 5
Hi Ruthie ,

See the file now. The tab labelled Random Sample has formulae in all 4 columns ; I have also created a named range called Number_of_Samples , which I have put to 5 ; you can change this to some other number , if you wish.

Narayan
 

Attachments

  • Test File - For Creating Random Samples_2.xlsx
    22.1 KB · Views: 6
Hi Ruthie,

here i an alternate solution, your data must be sorted on the Product Column

kanti
 

Attachments

  • Test File - For Creating Random Samples_2 (1).xlsx
    24.5 KB · Views: 6
I need to learn how to code.... thanks for your help, but I sadly doubt I'll be able to reverse-engineer that logic into my actual scenario of 600 products. I was too optimistic!

But thank you for the help!
 
Back
Top