Roll the Dice Game in Excel

In this example, we will explain how to simulate rolling two dice in Excel.

Note: This tutorial will not teach you the basics of formatting. We assume that you already know how to change font size and style, insert rows and columns, draw borders, change background color, and so on.

  1. Currently, each cell contains the letter “l” (lower case). In font Wingdings it looks like a dot:
  2. Enter a function RANDBETWEEN (RANDOMBETWEEN) to cell C2:

    =RANDBETWEEN(1,6)

    =СЛУЧМЕЖДУ(1;6)

    Roll the Dice Game in Excel

  3. Enter the formula shown below into the yellow filled cells.

    =IF(OR(C2=2,C2=3,C2=4,C2=5,C2=6),"l","")

    =ЕСЛИ(ИЛИ(C2=2;C2=3;C2=4;C2=5;C2=6);"l";"")

    If a 2, 3, 4, 5, or 6 is rolled, then those cells must contain a dot.

    Roll the Dice Game in Excel

  4. Enter the formula shown below into the red filled cells.

    =IF(OR(C2=4,C2=5,C2=6),"l","")

    =ЕСЛИ(ИЛИ(C2=4;C2=5;C2=6);"l";"")

    If a 4, 5, or 6 is rolled, those cells must contain a dot.

    Roll the Dice Game in Excel

  5. Enter the formula shown below into the blue filled cells.

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

    =ЕСЛИ(C2=6;"l";"")

    If a 6 is rolled, these cells must contain a dot.

    Roll the Dice Game in Excel

  6. Enter the formula below in the gray cell.

    =IF(OR(C2=1,C2=3,C2=5),"l","")

    =ЕСЛИ(ИЛИ(C2=1;C2=3;C2=5);"l";"")

    If a 1, 3, or 5 is rolled, that cell must contain a dot.

    Roll the Dice Game in Excel

  7. Copy Range C2:E5 and paste it into the range G2:I5.
  8. Change cell font color C2 и G2 to green (so that no numbers are visible).
  9. Нажмите кнопку Roll the Dice (or key F9).

Result:

Roll the Dice Game in Excel

Leave a Reply