Simulate Christmas candles in Excel
Originally published: 12/12/2022 13:28
Publication number: ELQ-92984-1
View all versions & Certificate
certified

Simulate Christmas candles in Excel

Simulate Christmas candles in Excel

Description
You can bring festive merriness to your PC by simulating Christmas candles using the magic of random numbers combined with conditional formatting. Why not have a go yourself? Or simply download and play with the finished file.



Basic version
Explanation: All four candles are always on


Step 1 - Paint your candles* Make columns narrow
* Add background colours for the base, the candles and the wicks
* Add a message at the bottom plus festive icons (using the Insert ribbon)


Step 2 - Add formulas
Enter these formulas in cells that should show flames:
=RANDBETWEEN(50, 100) for lighter flame colours
=RANDBETWEEN(1, 50) for darker flame colours in the centre, above the wick
These formulas generate random numbers every time a calculation is performed. We will use these to set the colours of the flames.


Step 3 – Add conditional formats
Select a block of cells containing the “flame cells” and add conditional formatting: 2-color scale 1=orange to 100=yellow



Step 4 – Tidy up
• Select then hide unused rows and columns (right click, hide)
• Remove the gridlines (View ribbon, Show section, deselect Gridlines)
• Protect sheet (Review ribbon) and deselect all options to hide the cell selection


Step 5 - Animate
Press and hold F9


Advent Sunday version
Explanation: Each candle only lights up when the related advent Sunday is reached.



* You need to add the curent date using the =TODAY() function and the four advent Sunday dates.
* For each flame, test if the relevant advent SUnday date has been reached, if not set value to zero.
* Add new conditional format: if zero, colour cell using background colur so that no flame is visible.

See the download file for details.

This Best Practice includes
1 Excel file

Gary Knott offers you this Best Practice for free!

download for free

Add to bookmarks

Discuss

Further information

To show users how to use random numbers and conditional formatting to generate a fun simulation for Christmas

Users who want to (1) have fun with Excel, or (2) learn to use random numbers and conditional formatting

People without Excel


0.0 / 5 (0 votes)

please wait...