This page is an advertiser-supported excerpt of the book, Learn Excel 2007-2010 from MrExcel - 512 Excel Mysteries Solved. If you like this topic, please consider buying the entire e-book.
Play Dice Games with Excel
Problem: My Monopoly set is missing the dice. How can I create a spreadsheet that will simulate randomly rolling two dice?
Strategy: You can use the RANDBETWEEN function and clever spreadsheet formatting to simulate two or more dice. Follow these steps:
1. Select cell B2. Select Home, Format, Row Height. Set the row height to 41.
2. In cell B2, enter the formula =RANDBETWEEN(1,6).
3. With cell B2 selected, click the Center and Middle Align buttons on the Home tab of the ribbon.
4. In the Font group of the Home tab, choose the Bold icon. Select 24 point from the font size dropdown.
5. Choose Thick Box Border from the Border dropdown.
6. Copy cell B2 and paste it to cell D2. As shown below, you will have the two dice required for Monopoly.
7. Copy B2 to make additional dice if necessary.
Figure 476 Create dice with Excel.
Results: You will have one die in cell B2 and another in cell D2. Every time you press the F9 key, you will have a new roll of the dice.
<-Previous Topic Next Topic->
For more resources for Microsoft Excel: