Skip to content

How to Roll the Dice in Excel

In this article, I will show you how to create the dice roll simulator you see below.

This workbook allows you to roll the dice simply by pressing the F9 key on your keyboard. Each time, you get a randomized roll of the dice.

If you don’t want to spend the time to build the workbook, you can download it using the link below.

Download the Workbook

Step 1 – The Setup

Select all cells in the workbook, and then:

  • Change the row height to 20
  • Change the column width to 3
  • Change the font size to 12
  • Change the horizontal alignment to Center
  • Change the vertical alignment to Middle

Select the range A1:I7, and apply a dark blue-grey fill color.

Select the ranges B2:D4 and F2:H4, and remove the fill color.

Also, select the range B6:H6, remove the fill color, and merge the cells.

Then, add the text, “Press F9 to roll the dice.” Bold the text as well.

Step 2 – The Roll Formulas

Enter the following formula into cell K1.

=RANDBETWEEN(1,6)

Then, enter the same formula into cell O1.

=RANDBETWEEN(1,6)

These formulas will calculate the randomized rolled values for the dice.

Step 3 – The Dice Formulas

Enter the following formulas into the designated cells for the first die.

In cells B2 and D4. (The letter is a lower case “L”.)

=IF(K1<>1, "l", "")

In cells B3 and D3.

=IF(K1=6, "l", "")

In cells B4 and D2.

=IF(K1>3, "l", "")

In cell C3.

=IF(ISODD(K1), "l", "")

Next, select B2:D4 and copy.

Then select cell F2 and paste.

These formulas enter a lowercase “L” if the die is supposed to display a dot based on the randomly generated die roll.

In the next step, we will change the font family to Wingdings. This will transform the lowercase “L” into a dot.

Step 4 – Change the Font

Select the range B2:H4, and change the font family to Wingdings. Also, increase the font size to 20.

Step 5 – Finishing Touches

Hide columns K through O.

And finally, go to View, and uncheck the box next to gridlines.

Now, you can press F9 to roll the dice at any time.

This Post Has 0 Comments

Leave a Reply

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Back To Top