Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Greegan
 
Posts: n/a
Default Random Number Questions

I hope my explanation below makes sense and that someone will be able to
help me out.

I want to have a worksheet that chooses a random number. The thing is, this
number represents a particular "playing card". This is for a board game my
friends and I have decided to try online...
So this playing card is repeated 5 times in a deck of 40.
What I would like to do is have numbers 1-5 represent the same playing card,
6-10 another, and so on.
I want to click a button on the worksheet, have it generate the number,
which draws the card and then not have that number repeat itself until I
"shuffle" or reset the deck with another button.
Now I have seen how the random number can be generated, and if I'm correct
the number will randomly select another number if a field is double-clicked
or F9(?) is selected...
I want to avoid the double click and F9. I would like to have it choose that
"playing card" and be able to continue with the "drawing" of cards until
they are all used or I reset the deck.

Could anyone assist me with this?

Much appreciated.

G


  #2   Report Post  
Dave Peterson
 
Posts: n/a
Default

I'm not quite sure how you populate your range (or when), but you may want to
look at JE McGimpsey's routine for non-duplicated random numbers.

You can find it he

http://www.mcgimpsey.com/excel/udfs/randint.html



Greegan wrote:

I hope my explanation below makes sense and that someone will be able to
help me out.

I want to have a worksheet that chooses a random number. The thing is, this
number represents a particular "playing card". This is for a board game my
friends and I have decided to try online...
So this playing card is repeated 5 times in a deck of 40.
What I would like to do is have numbers 1-5 represent the same playing card,
6-10 another, and so on.
I want to click a button on the worksheet, have it generate the number,
which draws the card and then not have that number repeat itself until I
"shuffle" or reset the deck with another button.
Now I have seen how the random number can be generated, and if I'm correct
the number will randomly select another number if a field is double-clicked
or F9(?) is selected...
I want to avoid the double click and F9. I would like to have it choose that
"playing card" and be able to continue with the "drawing" of cards until
they are all used or I reset the deck.

Could anyone assist me with this?

Much appreciated.

G


--

Dave Peterson
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Seed numbers for random number generation, uniform distribution darebo Excel Discussion (Misc queries) 3 April 21st 23 09:02 PM
How to keep random number from changing using RANDBETWEEN? TXlimogirl Excel Worksheet Functions 6 April 3rd 23 04:41 PM
How can I get Positive values only from the random number generat. Markw3700 Excel Discussion (Misc queries) 1 January 21st 05 01:37 AM
Random number generator Philippe L. Balmanno Excel Worksheet Functions 4 December 17th 04 08:42 AM
GET.CELL Biff Excel Worksheet Functions 2 November 24th 04 08:16 PM


All times are GMT +1. The time now is 02:32 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"