+ Reply to Thread
Results 1 to 3 of 3

Thread: hold random numbers

  1. #1
    Registered User
    Join Date
    03-24-2008
    Posts
    1

    hold random numbers

    im trying to construct a mini slot machine. i created a macro which provides three random numbers.

    i now need to create another which can hold the doubles that show on a1 and a2.

    i tried creating a seperate macro button which basically provides another random number in a3 but for some reason it randoms cells a1:a3 again.

    any help how to configure this in excel?

  2. #2
    Forum Moderator Richard Buttrey's Avatar
    Join Date
    02-15-2008
    Location
    Grappenhall, UK
    MS-Off Ver
    Excel for Windows & Mac - all versions.
    Posts
    6,566
    Quote Originally Posted by ma501th
    im trying to construct a mini slot machine. i created a macro which provides three random numbers.

    i now need to create another which can hold the doubles that show on a1 and a2.

    i tried creating a seperate macro button which basically provides another random number in a3 but for some reason it randoms cells a1:a3 again.

    any help how to configure this in excel?

    That's correct. The RAND() function is volatile and will re-evaluate every time a change is made on the sheet. To achieve your objective you will need to get the macro to convert A1 & A2 to Values by copying and PasteSpecial values. Then of course you'll need to make the first action of the macro one that enters the =RAND() function in A1:A2.

    HTH

  3. #3
    Valued Forum Contributor
    Join Date
    02-28-2006
    Posts
    690
    if your first spin gives 3 1 3 you presumably want to hold reels 1 and 3 and respin 2?

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.2.0