Break Education STEM

Random Fun with Excel

This is a seemingly useless but visually fun usage of visuals, combined with Excel functions and VBA I did to take a break from my typical gnarly Excel analytics work 🙂

How it works:
1. Fill in a formula to generate random numbers between 1 and 100 (inclusive) across the cell range.
2. Apply 2 different conditional formatting to the range.
3. Write a macro that re-calculates the numbers in the range for x number of times.
4. Create a button object and assign the macro to it for when-clicked event.

That’s it. Have fun with other conditionals for a visual trip.

A video of the output:


An animated gif of the output:

Bonus Tip:

Can you think of creating a game out of this? For example, you could check how many 4-filled-squares you get once you “spin” (by pressing the button), and you could keep score. Much like spinning wheels in a casino. Your imagination is the limit!

Leave a Reply

Your email address will not be published. Required fields are marked *

Back To Top