Random Number Generator 1 to 60

mike31z

Board Regular
Joined
May 8, 2007
Messages
149
Office Version
  1. 2019
Platform
  1. Windows
I need some help in creating a random number generator from 1 to 60 and I need to to this for 25 different times.
We have this wheel ( Paddle wheel and we have 20 paddles) with the numbers 1 to 60 and we sell chance tickets for a $1.00 to win 20.00.
Then I am going to print them on business size cards that way we don't have to retrieve the actuals paddles.
Can any one help me with a Random Number Generator for 1 to 60.

mike in wisconsin
 

Excel Facts

Best way to learn Power Query?
Read M is for (Data) Monkey book by Ken Puls and Miguel Escobar. It is the complete guide to Power Query.
Why not just print out 60 slips of paper (numbered 1-60) and draw them from a hat?

This formula will return a random number between 1 and 60
=INT(1+RAND()*60)
 
Upvote 0
Not sure what you mean but, if you want to generate 1 ranndom number between 1 and 60:

=RANDBETWEEN(1,60)

Pressing F9 will change the value.
If this isnt what you need post back
 
Upvote 0
Random Number Generator

I need to generate a set of random numbers 1 to 60 in groups of 3 non repeating groups, That will give me 20 sets of three numbers.

Then I would like to create 20 to 25 sets of these numbers. with each group being different. We use it as one of our fund raiser for different events in our community.

mike in wisconsin
 
Upvote 0
Paddyd, I looked at your link and I don't know enough if what I want is there but


thank you



I did find this


http://www.randomizer.org/form.htm



That provide the numbers now I have to get it to bussiness cards.

mike in wisconsin
 
Upvote 0
Or you can try
Code:
Sub noreprand()
n = 60
ReDim a(1 To n, 1 To 1), c(1 To n, 1 To 3)
For t = 1 To 3
p = 0
For i = 1 To n
    a(i, 1) = i
Next i
Do
    x = Int(Rnd() * n) + 1
    If Not IsEmpty(a(x, 1)) Then
        p = p + 1
        Cells(p, 40) = p
        c(p, t) = a(x, 1)
        a(x, 1) = Empty
    End If
Loop Until p = n
Next t
[a1].Resize(n, 3) = c
End Sub
 
Upvote 0
I need some help in creating a random number generator from 1 to 60 and I need to to this for 25 different times.
We have this wheel ( Paddle wheel and we have 20 paddles) with the numbers 1 to 60 and we sell chance tickets for a $1.00 to win 20.00.
Then I am going to print them on business size cards that way we don't have to retrieve the actuals paddles.
Can any one help me with a Random Number Generator for 1 to 60.

mike in wisconsin
try
Code:
Sub test()
Dim myMaxNum As Long, mySet As Long, a(), i As Long, ii As Long, iii As Long
myMaxNum = Int(Application.InputBox("Enter limit",type:=1))
If myMaxNum < 1 Then Exit Sub
mySet = Int(Application.InputBox("How many sets?", type:=2)
If mySet < 1 Then Exit Sub
ReDim a(1 To myMaxNum, 1 To 2)
Randomize
For i = 1 To mySet
     For ii = 1 To myMax
          a(ii,1) = i
          a(ii,2) = Rnd()
     Next
     VSortMA a, 1, UBound(a,1), 2
     .Range("a1").Offset(,iii).Resize(UBound(a,1)).Value = a
     iii = iii + 1
Next
End Sub

Private Sub VSortMA(ary, LB, UB, ref)
Dim i As Long, ii As Long, iii As Long, M As Variant, temp As Variant
i = UB : ii = LB
M = ary(Int((LB+UB)/2,ref)
Do While ii <= i
     Do While ary(ii,ref) < M
          ii = ii + 1
     Loop
     Do While ary(i,ref) > M
          i = i - 1
     Loop
     If ii <= i Then
          For iii = LBound(a,2) To UBound(a,2)
               temp = ary(ii,iii) : ary(ii,iii) = ary(i,iii) : ary(i,iii) = temp
          Next
          i = i - 1 : ii = ii + 1
     End If
Loop
If LB < i Then VSortMA ary, LB, i, ref
If ii < UB Then VSortMA ary, ii, UB, ref
End Sub
 
Upvote 0

Forum statistics

Threads
1,213,494
Messages
6,113,972
Members
448,537
Latest member
Et_Cetera

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top