How to make a pair of dice in Excel

Did you know you can make dice in Excel? Using several functions, you can create a dice roll that graphically represents a pair of dice on your worksheet.

Each die represents a random number generated by the function EDGE BETWEEN † The dots on the edges of the matrix use the Wingdings font and a combination of features AND IF And OR when dots appear in each cell.

Depends on the random numbers the function generates EDGE BETWEEN , the dots appear in the corresponding cells on the worksheet. The dice can be rerolled by recalculating the worksheet.

These instructions apply to Excel 2019, 2016, 2013, 2010, and Excel for Office 365.

Contents
  1. build bones
  2. Add a RANDBETWEEN feature
  3. Functions behind the dots
  4. Throw the dice
  5. Hide the RANDBETWEEN feature

build bones

First, you need to apply some formatting methods to display the bones in an Excel sheet. These include changing the size and alignment of cells, as well as the type and size of the font.

  1. Open a blank sheet in Excel and select cells D1 before J3

  2. Press the button Format tab At home

  3. Install for Ride height meaning 24.75 and for values Column width meaning five

  4. Select Cell format drop down menu Format and go to the tab alignment † to install Horizontal Cell Alignment And in front of Vertical alignment of cells on the Centre

  5. Go to the tab Font style † Install for Font style meaning Wingdings and for Font size 36 † Click Okay

  6. Select cells D1 And F3

  7. to install Cell background color to blue.

  8. Select cells H1 And J3

  9. to install Cell background color to red.

Add a RANDBETWEEN feature

Once you are done formatting the cells, you need to enter the function EDGE BETWEEN in two cells to generate random numbers that appear as dots on the dice.

  1. Press cell E5 under the blue bone.

  2. Open a tab formulas on the menu ribbon

  3. Select Mathematics and Triggers on tape

  4. Click EDGE BETWEEN in the list to open the dialog box function

  5. Click on a line Lower

  6. Enter the number a

  7. Click on a line Top

  8. Enter the number 6

  9. Click Okay † A random number from 1 to 6 appears in cell E5

  10. Press cell I5 under the red bone.

  11. To repeat steps 2 before 10 above.

  12. A number from 1 to 6 appears in cell I5

Functions behind the dots

To generate the correct number of points, you must use the IF function in cells D1-D3, E2, and F1-F3 in the first bone, and in cells H1-H3, I2, and J1-J3 in the second. Some cells also contain the function AND or OR

Type or paste the formulas below into the Formula Bar instead of directly into a cell, as this will format the cell incorrectly.

IN cells D1 And F1 enter the following function:

 = IF (AND (E5> = 2, E5  

This function checks if there is a random number in it cell E5 between 2 and 6; in this case the function puts a lowercase L in the cells D1 And F1, , a dot in the Wingdings font. If not, the cells will remain empty. To get the same result for the second stamp, enter the following function: cells H1 And J1

 = IF (AND (I5> = 2, I5 

В ячейках D2 и F2 введите следующую функцию:

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

This function checks whether a random number in cell E5 6; if so, a point is placed at cells D2 And F2 † If not, the cell will remain empty. To get the same result for the second stamp, enter the following function: cells H2 And J2

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

IN cells D3 And F3 enter the following function:

 = IF (AND (E5> = 4, E5 

Эта функция проверяет, находится ли случайное число в ячейке E5 между 4 и 6; если это так, он помещает точку в ячейки D3 и F3 . Если нет, то клетки остаются пустыми. Чтобы получить тот же результат для второго штампа, введите следующую функцию в ячейки H3 и J3 :

 = IF (AND (I5> = 4, I5 

В ячейке E2 введите следующую функцию:

 = IF (ИЛИ (E5 = 1, E5 = 3, E5 = 5), "l", "") 

This function checks whether a random number in cell E5 1, 3 or 5; if so, "l" in . set cell E2 † If not, the cell will remain empty. To get the same result for the second stamp, enter the following function: cells I2

 = IF (ИЛИ (I5 = 1, I5 = 3, I5 = 5), "l", "") 

Throw the dice

To roll the dice, you have to count your worksheet again. You can choose Calculate now in section formulas ribbon (calculator-like icon) or press F9 You are using the desktop version of Excel.

As a result of the recalculation of the function EDGE BETWEEN in cells E5 And I5 generate another random number between 1 and 6.

Hide the RANDBETWEEN feature

After you complete the dice game and check all the functions for correct operation, you can hide the functions EDGE BETWEEN in cells E5 and I5:

  1. Select cells E5 And I5

  2. On the tab At home change font color of these cells according to the background color, which in this case is white.

Leave a Reply

Your email address will not be published.