Excel Rolling Dice Tutorial

This tutorial will show you how to create a dice roll in Excel that graphically displays a pair of dice on your worksheet.

The die will show a random number generated by the function EDGE BETWEEN † Points on the edges of the matrix are created using the Wingdings font and a combination of functions AND IF and OR when dots appear in each cell.

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

This guide is compatible with most versions of Excel, including 2007, 2010, 2013, 2016, and Office 365.

Content
  1. build bones
  2. Add a RANDBETWEEN feature
  3. Functions behind the dots (#1)
  4. Features behind the dots (#2)
  5. Features behind the dots (#3)
  6. Functions behind the dots (#4)
  7. Throw the dice
  8. Hide the RANDBETWEEN feature

build bones

The steps below cover the formatting methods used to display dice graphically on an Excel sheet; these include cell size and alignment, as well as font and size:

  1. Select cells D1 and J3

  2. Press the button Format tab House

  3. Suitable for Ride height meaning 24.75 and for values Column width meaning 5

  4. Suitable for horizontal cell alignment meaning in the middle and for for vertical cell alignment average

  5. Install for Font style meaning Wingdings and for Font size 36

  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

Function EDGE BETWEEN used to generate random numbers on the dice. Follow these steps to implement a random number generator:

For the first cube

  1. Press cell E5

  2. Press Formulas Tab on the menu ribbons

  3. Select Mathematics and Triggers on tape

  4. Click EDGE BETWEEN in the list to open Formula Builder

  5. Press lower line.

  6. Enter the number a in this line.

  7. Click on a line top

  8. Enter the number 6 in this line.

  9. Click Finished

A random number from 1 to 6 should appear in cell E5

For the second cube

  1. Press cell I5

  2. To repeat steps 2 before 9 above.

A random number from 1 to 6 should appear in cell I5

Functions behind the dots (#1)

V cells D1 and F3 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; if yes then the function puts lowercase L’s in the cells D1 and F3 † If not, the cells will remain empty. To get the same result for the second stamp, enter the following function: cells H1 and J3

 = IF (AND (I5> = 2, I5 

Буква l (строчная буква L) является точкой в ​​шрифте Wingdings.

Функции за точками (# 2)

В ячейках 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", "") 

Features behind the dots (#3)

V cells D3 and F1 enter the following function:

 = IF (AND (E5> = 4, E5 

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

 = IF (AND (I5> = 4, I5 

Функции за точками (# 4)

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

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

This function checks whether a random number in cell E2 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, all you need to do is recalculate your worksheet. You can choose Calculate now In chapter formulas ribbon or press the key F9 that you use. desktop version of Excel; this will force the functions EDGE BETWEEN v cells E5 and I5 generate another random number from 1 to 6.

Hide the RANDBETWEEN feature

Once the dice are completed and all features are tested to make sure they work properly, the features EDGE BETWEEN v cells E5 and I5 can be hidden as follows:

  1. Select cells E5 and I5

  2. Change font color these cells according to the background color. In this case, change it to white.

Leave a Reply

Your email address will not be published.