Tabulating random number results

jms6497

New Member
Joined
Apr 15, 2002
Messages
7
I have an excel spreadsheet that analyzes Powerball numbers. One of the worksheets in the file is used to generate random numbers. It is set up with a macro button to generate 5 random numbers in 5 specific cells and regenerates a new set of numbers in the same cells with each "push" of the button. What I would like to do is tabulate the results of each "push" of the button in a table (preferably in the same worksheet). I have not been able to figure out how to accomplish this....any suggestions.
 

Excel Facts

Show numbers in thousands?
Use a custom number format of #,##0,K. Each comma after the final 0 will divide the displayed number by another thousand
What do you actually want to save? (the number of times a number appears, or the number of times two numbers appear together, or what?)
 
Upvote 0
Hi,

You couldn't have known, but unique random numbers have been quite a topic around here in recent days.

Assuming that A1:E1 are the cells housing your lottery numbers and that columns F:J are where you are storing the trial runs, add this to your subroutine before you do anything else.

-------------
Sub tester()
Dim nextrow As Long
nextrow = Cells(Rows.Count, "F").End(xlUp).Row + 1
Range("F" & nextrow & ":J" & nextrow) = Range("A1:E1").Value
End Sub
-------------

HTH,
Jay
 
Upvote 0
On 2002-04-16 13:02, Al Chara wrote:
What do you actually want to save? (the number of times a number appears, or the number of times two numbers appear together, or what?)

I merely want to tabulate each set of numbers in a 5-column table.
 
Upvote 0
On 2002-04-16 13:14, Jay Petrulis wrote:
Hi,

You couldn't have known, but unique random numbers have been quite a topic around here in recent days.

Assuming that A1:E1 are the cells housing your lottery numbers and that columns F:J are where you are storing the trial runs, add this to your subroutine before you do anything else.

-------------
Sub tester()
Dim nextrow As Long
nextrow = Cells(Rows.Count, "F").End(xlUp).Row + 1
Range("F" & nextrow & ":J" & nextrow) = Range("A1:E1").Value
End Sub
-------------

HTH,
Jay

Thanks, I will try this and see what happens!!
 
Upvote 0

Forum statistics

Threads
1,213,484
Messages
6,113,920
Members
448,533
Latest member
thietbibeboiwasaco

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