Help Files and Tutorials for Computer Users

Another Spreadsheet Project

Okay, so you've been working hard and need a break.  Try this spreadsheet problem.

*This was originally written for Appleworks on a MAC, but it also worked in Excel 97.  I have made a few changes to get it to work in Excel XP.  Some formulae will have to be modified.

Fig. A

Follow the directions below to create a pair of dice that actually work by holding down the Ctrl + Shift keys while hitting the = sign, (On Mac: Command + Shift), or F9 on Excel XP.
  1. Open a new Spreadsheet document.

  2. From the Format menu, select Document and limit the number of columns to 7 and the number of rows to 4

  3. Select Row Height and Column Widths of 72pt

  4. Highlight all cells and choose a font size of 36

  5. In Cell A4 type the formula: RAND(6)   In Excel XP  use  =INT(RAND()*6)+1 . This will generate the random numbers of the dice.

  6. In Cell A1 type =IF(A4>1,"l","") letter L, not 1.

  7. Cell C1 type =IF(A4>3,"l","")

  8. Cell A2 type =IF(A4=6,"l","")

  9. Cell B2 type =IF(OR(A4=1,A4=3,A4=5),"l","")

  10. Cell C2 type =IF(A4=6,"l","")

  11. Cell A3 type =IF(A4>3,"l","")

  12. Cell C3 type =IF(A4>1,"l","")

  13. Cell A4 type =INT(RAND()*6)+1

  14. Select the range of 4x3 cells A1..C4 and select Copy from the Edit menu. Move the cursor to cell E1 and select Paste from the Edit menu.

  15. Select the range of cells from A1 to G3 and change the font to Wingdings (In the Format menu select Font and Wingdings) This changes the letter "l" to dots.

  16. Cell D4 type =A4+E4  This will display the total of the pair of dice.

Fig. B


Fig. C

You can experiment with the colours of the dice, and the font colour and size.  Make sure you choose Center Alignment so the dots will be centered in the squares.

To hide the Random numbers in Cell A4 and E4 change the font colour to match the cell colour.

I added another feature.  If you type the following in any of the blank cells, such as D2, it will display the caption "Lucky Seven" whenever the pair of dice adds up to seven.

=IF((D4=7),"Lucky Seven","")

Under Options choose Display and uncheck all the checkmarks. Select all cells and Lock them (under Options) to prevent accidentally changing them.

Fig. D

If you want to get fancy, try adding a border around the dice.  Make sure you have a backup copy saved as well.

Save your file with a unique name such as tc_game1.xls (my_initials_game_1)

On the Macintosh, hold down the command and shift key, then press the = sign. The two dice will change values randomly. In Windows, hold down the CTRL and shift keys instead. (In Office XP try F9)

To finish off add a column to the left and a row at the top. Create a visual border around the game and shade it a distinctive colour.  Change the text colour if necessary. You can also select and hide the unneeded rows and columns so that only the game area is displayed.

You may need to change some of the cell references once you insert a new row and column.  Do these steps before handing in the project.

Back to Home Page