Results 1 to 7 of 7

Visualize random selection with flashing cells

Threaded View

  1. #1
    Registered User
    Join Date
    09-24-2019
    Location
    Norway
    MS-Off Ver
    Office 2019
    Posts
    23

    Visualize random selection with flashing cells

    Hello,

    I am playing around with an idea to create a game in Excel, but I know next to nothing about macros and VBA.

    I have a set of 7 cells, where one is to be picked at random at the press of a button. This is done with a button and a RandBetween(1,7) macro, which I have successfully created.

    However, if the button simply picks the same number several times in succession, it will appear as if nothing happened when the button was pressed, which will be confusing for the player. So I want to insert some kind of visualization between the button click and the resulting number so that the result is intuitively accepted as a fair draw even if the same number is picked several times in a row.

    To visualize the randomness, I want the 7 alternative cells to be highlighted (by some kind of format change, border, text color or background color), one at a time, at random order, for a set number of times until the final number is selected. I want this visualization to last for about 1 second.

    Can this be done?

    Alternatively, I am open for suggestions to other ways to visualize randomness. Maybe a much easier way would be to just have the RandBetween(1,7) refresh 20 or so times before it lands on the final number. And then the corresponding cell can easily be highlighted based on the final value. But how can I make the random number refresh several times? I tried to record a macro where I refresh the function, but it didn't result in the desired effect.

    I use Excel 2019.

    Edit:
    Actually, this can probably be solved by my second suggestion, if there is a conditional format that reads the random number as if refreshes.. Then it should be able to highlight the alternatives until one final alternative is selected?

    But I am also going to use that random number to load one out of a set of "cards" (think of this game as Monopoly-style board game). So I don't want the refreshing random number to make the game load a bunch of cards before the final number is selected.
    So is there a way to delay the rest of the model for about 1 second until the visualization is complete?

    I haven't really created much of this yet, so I don't really have much to attach to this post. Hope the description is sufficient.
    Last edited by LGN; 01-11-2021 at 08:07 PM.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] make a random selection from 5 cells in a filtered sheet
    By Megatronixs in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 09-16-2016, 12:55 AM
  2. Random selection option, same 'random' selection in two columns
    By applebanana in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 02-01-2016, 06:16 PM
  3. Replies: 1
    Last Post: 12-23-2015, 02:08 PM
  4. Select Random Cells in the Selection
    By koticphreak in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 03-21-2010, 10:41 AM
  5. Random Selection of cells and values averaged.
    By rahulk in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 08-02-2009, 12:32 AM
  6. Random selection of cell information from a group of cells
    By Icecycle66 in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 07-23-2009, 11:18 AM
  7. [SOLVED] random selection from a range of cells
    By tjb in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 02-15-2005, 06:45 PM

Tags for this Thread

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.6.0 RC 1