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
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 here:
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
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks