How to Create a Pair of Rolling Dice in Excel


Excel may look like a serious office tool built for budgets, invoices, quarterly reports, and quietly judging your formula mistakes. But beneath those tidy rows and columns is a surprisingly playful machine. With just a few formulas, some formatting, and optional button magic, you can create a pair of rolling dice in Excel that behaves like a mini tabletop game.

This guide shows you how to build two dice that generate random numbers from 1 to 6, calculate the total, display dice faces, and refresh whenever you press F9 or click a roll button. You do not need to be a programmer. You only need basic Excel confidence, a willingness to type formulas correctly, and the emotional strength to forgive Excel when it changes your random numbers at the worst possible moment.

Whether you are creating a classroom probability activity, a board game helper, a training demo, or a just-for-fun spreadsheet, this tutorial walks through the process step by step.

What You Will Build

By the end, your worksheet will include:

  • Two dice values generated with RANDBETWEEN
  • A total score cell that adds both dice
  • Optional visual dice faces using Unicode dice symbols
  • A cleaner layout that looks more like a game than a tax audit
  • An optional macro button that “rolls” the dice when clicked

The simplest version takes less than five minutes. The polished version takes a bit longer, mostly because you will probably spend too much time choosing cell colors. That is normal. Spreadsheet aesthetics are a real rabbit hole.

Understanding the Excel Formula Behind Rolling Dice

The heart of a rolling dice spreadsheet is the RANDBETWEEN function. This function returns a random integer between two numbers you specify. Since a standard die has six sides, the formula is beautifully simple:

The first number, 1, is the lowest possible result. The second number, 6, is the highest possible result. Each time Excel recalculates the worksheet, the formula can produce a new value. That means your dice can “roll” whenever the workbook recalculates.

Excel recalculates when you edit cells, open the workbook, change formulas, or press F9. That behavior is perfect for dice because dice are supposed to change. If your spreadsheet dice never changed, they would be less “game night” and more “decorative cube.”

Step 1: Set Up the Worksheet

Open a blank Excel workbook. You can build this in Excel for Microsoft 365, Excel 2024, Excel 2021, Excel 2019, or most modern desktop versions. The core formula also works in Excel for the web, although macro features are more limited there.

Create a simple layout like this:

Cell Purpose Example Label or Formula
A1 Title Rolling Dice in Excel
A3 Die 1 label Die 1
B3 Die 1 result =RANDBETWEEN(1,6)
A4 Die 2 label Die 2
B4 Die 2 result =RANDBETWEEN(1,6)
A6 Total label Total
B6 Total result =B3+B4

Now press F9. The values in B3 and B4 should change. Congratulations: you have created working dice in Excel. It is not glamorous yet, but neither was the first spreadsheet ever made. We keep going.

Step 2: Format the Dice Values

Formatting makes the dice easier to read and more fun to use. Select cells B3:B4, increase the font size, center the text, and add borders. You can also widen column B and increase row height so each die result looks like a square tile.

Try these quick formatting choices:

  • Font size: 36 or larger
  • Horizontal alignment: Center
  • Vertical alignment: Middle
  • Cell border: Thick outside border
  • Fill color: Light gray, white, or another clean background

If you want a classic dice look, keep the cells white with black text and a bold border. If you want a game-show look, use bright colors. If you want a corporate training look, use brand colors and pretend the dice are part of a “dynamic decision simulation framework.” Excel will not object.

Step 3: Add a Dice Total

The total of two dice is useful for games and probability lessons. In cell B6, enter:

The total will range from 2 to 12. This is also a great way to demonstrate probability. While each die face has the same chance of appearing, the total values are not equally likely. For example, 7 is more common than 2 or 12 because there are more combinations that produce 7.

For a quick teaching example, the total 2 can only happen with 1 + 1. The total 12 can only happen with 6 + 6. But 7 can happen with 1 + 6, 2 + 5, 3 + 4, 4 + 3, 5 + 2, or 6 + 1. That makes Excel dice a useful mini-lab for probability, randomness, and simulation.

Step 4: Display Dice Faces With Unicode Symbols

Numbers are fine, but dice faces are more fun. Excel can display special characters, including Unicode dice symbols. The Unicode dice faces are:

  • ⚀ for one
  • ⚁ for two
  • ⚂ for three
  • ⚃ for four
  • ⚄ for five
  • ⚅ for six

You can use the CHOOSE function to convert the random number into a dice symbol. In cell C3, enter:

In cell C4, enter:

Make cells C3 and C4 very large, perhaps font size 48 or 72. Center the symbols and add borders. Now your spreadsheet has visual dice faces instead of plain numbers.

Alternative Formula Using UNICHAR

You can also use UNICHAR because the dice symbols are sequential Unicode characters. The die face for one starts at decimal code 9856, and the die face for six ends at 9861. If your die value is in B3, this formula returns the matching symbol:

For B4, use:

This version is elegant because it avoids typing all six symbols manually. However, the CHOOSE version is easier for beginners to understand. Use whichever one makes your spreadsheet feel less like it is wearing a lab coat.

Step 5: Create a Cleaner Dice Dashboard

Once the formulas work, you can turn the worksheet into a small dashboard. A simple layout might look like this:

Area Suggested Cells Purpose
Title A1:D1 Main heading
Dice display B3:C6 Two large dice symbols
Total B8:C8 Combined result
Instructions A10:D12 Tell users to press F9 or click the button

For example, put the first dice symbol in B4 and the second in C4. Put the hidden number formulas in another area, such as F3 and F4. Then your visible dice cells can refer to those hidden values.

Here is one practical structure:

  • F3: =RANDBETWEEN(1,6)
  • F4: =RANDBETWEEN(1,6)
  • B4: =UNICHAR(9855+F3)
  • C4: =UNICHAR(9855+F4)
  • B8: =F3+F4

You can hide column F after setup. That keeps the dashboard clean while preserving the working formulas behind the curtain. Every good spreadsheet has a little backstage area where the formulas wear sweatpants.

Step 6: Add Conditional Formatting for Special Rolls

Conditional formatting can make the dice roller more interactive. For example, you can highlight the total when the user rolls doubles, a 7, or the maximum roll of 12.

Highlight Doubles

If your dice values are in F3 and F4, select your dice display cells and create a conditional formatting rule using this formula:

Choose a bold fill color or border. Now, whenever both dice match, Excel celebrates with formatting. It is not confetti, but for a spreadsheet, it is close.

Highlight a Total of 7

Select the total cell and use this conditional formatting formula:

This is useful in probability demonstrations because 7 is the most common total when rolling two fair six-sided dice.

Highlight Snake Eyes or Boxcars

In dice language, “snake eyes” means rolling two ones, and “boxcars” means rolling two sixes. You can create separate rules:

These rules add personality to your worksheet and make results easier to spot at a glance.

Step 7: Roll the Dice With F9

The easiest way to roll the dice is to press F9. In Excel, F9 recalculates formulas in open workbooks. Since RANDBETWEEN recalculates when the worksheet calculates, pressing F9 acts like a roll button.

This approach is simple, reliable, and does not require macros. It also works well when sharing the workbook with people who may not want to enable macro files. For many users, this is the best version: open the workbook, press F9, roll the dice, enjoy the tiny thrill of spreadsheet randomness.

Step 8: Add a Roll Button With a Macro

If you want a more polished experience, add a clickable roll button. This requires a macro, which means the workbook should be saved as a macro-enabled file with the .xlsm extension.

First, make sure the Developer tab is visible. If it is not, go to File > Options > Customize Ribbon, then check Developer.

Next, create a simple macro:

  1. Go to the Developer tab.
  2. Click Visual Basic.
  3. Insert a new module.
  4. Paste the following code:

This macro tells Excel to recalculate, which refreshes the dice formulas. It is short, clean, and less dramatic than most movie hacking scenes.

Add the Button

  1. Return to Excel.
  2. Go to Developer > Insert.
  3. Choose Button under Form Controls.
  4. Draw the button on the worksheet.
  5. Assign the RollDice macro.
  6. Rename the button Roll Dice.

Now clicking the button will roll both dice. If the macro does not run, check whether macros are enabled and confirm that the workbook is saved as .xlsm. Excel is cautious with macros for security reasons, and that caution is a good thing. A dice button should be fun, not suspicious.

Formula-Only Version vs. Macro Version

Both methods work. The best choice depends on your goal.

Method Best For Pros Cons
Formula-only with F9 Beginners, classrooms, shared files Simple, safe, no macro setup Less button-like
Macro button Interactive dashboards and games Feels polished and user-friendly Requires macro-enabled workbook

If you are publishing a downloadable file for a broad audience, consider offering the formula-only version first. Some people avoid macro files, especially in work or school environments. If you are building it for your own use, the button version is delightful.

Common Problems and Quick Fixes

The Dice Do Not Change

Press F9. If nothing happens, check whether your formulas are actually using RANDBETWEEN. Also check Excel’s calculation mode. If calculation is set to manual, F9 should still recalculate, but automatic updates may not happen when you edit the sheet.

The Dice Symbols Show as Boxes

If you see empty boxes instead of dice symbols, the font may not support those Unicode characters. Try changing the dice display cells to a font such as Segoe UI Symbol, Arial Unicode MS if available, or another Unicode-friendly font.

The Button Does Nothing

Make sure the macro is assigned to the button. Right-click the button, choose Assign Macro, and select RollDice. Also confirm macros are enabled and that the workbook is saved as a macro-enabled file.

The Numbers Change Too Often

This is normal because RANDBETWEEN is volatile. It recalculates when the worksheet recalculates. If you need to preserve a roll, copy the result and paste it as values somewhere else. That freezes the number so Excel cannot reshuffle it like a caffeinated dealer at a casino table.

Creative Ways to Use Excel Rolling Dice

Once your pair of rolling dice works, you can expand the idea in several useful ways. Teachers can use it to demonstrate probability distributions. Game designers can use it to test simple mechanics. Trainers can use it for random prompts, icebreakers, or team activities. Parents can use it for homemade board games. Data learners can use it to practice formulas, charts, and simulations.

You can also create a roll history. For example, after each roll, copy the total into a list and build a chart showing how often each total appears. This turns a simple dice roller into a probability experiment. After 10 rolls, the results may look chaotic. After 1,000 rolls, the pattern should begin to show totals near 7 appearing more often than totals near 2 or 12.

That is one of the best things about Excel: it can move from toy to teaching tool very quickly. One moment you are rolling cartoon dice. The next, you are explaining distribution curves. Spreadsheet whiplash, but educational.

Best Practices for a Better Dice Spreadsheet

Keep your visible area clean. Place helper formulas off to the side or on a hidden sheet. Use clear labels so users know how to roll. Add a short instruction such as “Press F9 to roll” or “Click Roll Dice.” Avoid overcomplicating the first version. It is better to build a working simple model than a half-finished masterpiece with twelve buttons and one mysterious error.

Also, test the workbook before sharing it. Press F9 several times, click the button if you added one, and confirm that the total always matches the two dice. If you use conditional formatting, check that special rolls trigger correctly. A dice roller with a wrong total is like a calculator that occasionally believes 2 + 2 equals “surprise.”

Experience Notes: Lessons From Building Rolling Dice in Excel

Creating rolling dice in Excel is one of those projects that looks tiny at first but teaches more than expected. The first lesson is that Excel’s random functions are powerful because they are simple. A single formula, =RANDBETWEEN(1,6), immediately turns a static cell into something dynamic. That small change shifts Excel from a place where data sits still into a place where events can happen.

Another useful lesson is that presentation matters. A plain number in a cell technically works, but it does not feel like dice. When the number becomes a large symbol, sits inside a bordered square, and updates with a button, the workbook suddenly feels interactive. This is important for anyone building Excel tools for other people. Users often trust and enjoy a spreadsheet more when it gives visual feedback.

There is also a practical lesson about hidden helper cells. Beginners often try to cram everything into the visible area. That can work, but the sheet gets messy fast. A cleaner approach is to keep the random numbers in hidden cells and use visible cells only for the display. This same structure applies to dashboards, reports, calculators, and templates. Separate the engine from the dashboard. Let formulas do the work backstage while the front end stays friendly.

The macro button is another good learning moment. You do not need VBA to create rolling dice, but adding a macro shows how Excel can become more application-like. A simple Application.Calculate macro is easy to understand because it does one job: recalculate the workbook. That makes it a gentle introduction to automation without burying beginners in complicated code.

However, macros also teach caution. A workbook with macros may trigger security warnings, and some users will not enable them. That is why it is smart to design a formula-only version first. Pressing F9 is not as flashy as clicking a button, but it is dependable and easy to share. In real-world spreadsheet design, dependable usually beats flashy. Flashy is nice, but dependable brings snacks and shows up on time.

Building dice also helps users understand randomness. People often expect random results to “look balanced” in small samples. But if you roll two dice ten times, you might see repeated totals, long gaps, or strange clusters. That does not necessarily mean the formula is broken. It means randomness is doing what randomness does: refusing to act neat just because humans enjoy patterns. When you track many rolls, the broader probability pattern becomes clearer.

Finally, this project is a reminder that learning Excel does not have to start with finance models or giant datasets. A playful project can teach formulas, formatting, recalculation, conditional logic, Unicode symbols, macros, and testing. That is a surprisingly rich lesson from two little dice. Excel may be famous for spreadsheets, but with a little imagination, it can also host game night.

Conclusion

Creating a pair of rolling dice in Excel is simple, useful, and more entertaining than a spreadsheet has any right to be. The core method uses RANDBETWEEN(1,6) for each die, then adds the results with a basic sum formula. From there, you can improve the worksheet with dice symbols, formatting, conditional highlights, roll totals, and an optional macro button.

For most users, the formula-only version is the best starting point because it is fast and easy to share. For a more polished experience, the macro button adds a satisfying click-to-roll feature. Either way, the project gives you a hands-on way to practice Excel formulas, random number generation, dashboard design, and light automation.

And the next time someone says Excel is boring, show them your rolling dice workbook. Then press F9 dramatically. Spreadsheet theater is still theater.