VBA Yahtzee
Posted on September 15, 2012.
This is a .xlsm file so you need to enable macros! For those using versions prior to Excel 2007, I have programmed it to use the ribbon but the game may still work.
Using the Ribbon Buttons

Even though the buttons to start a new game, roll the dice, and rank all players are found on the board, I also included them in the ribbon for convenience.

Playing the Game

The score sheet is completely interactive. When the player clicks "New Game," it asks how many players will be playing. For each player, they enter their name which is then populated into the spreadsheet. When a player has finished rolling what they want, they then click inside the cell to put their score. The computer then calculates according to the dice and criteria needed and puts the correct value into the cell. Any time during the game, players can click "Rank" and it will reorganize the scorecard placing the leader at the top.

Rolling the Dice

The player clicks "Roll" which randomly rolls the dice. The player can then choose which dice they want to keep by either clicking anywhere within the cells or the checkmarks next to the dice. The selected dice will change to the color black. After three rolls, the player is required to place their score in the score sheet. The game prompts the user to place their score if they try to roll more than three times. Click anywhere on the scorecard to add your score to that particular scoring item. The two photos below are an example of what it looks like before the user selects the dice they want to keep and after they have selected the dice.


Hello, i'm currently in year 10 and i have to do an assignment for school. I've decided to make a Yahtzee game on excel and i'm wondering how to stop all dice from rolling every time i press roll. I would really appreciate it if you were able to tell me how you were able to select specific dice to not roll again, thank you

– August 07, 2020 02:57 AM by Meg Blain

You can access the source code and reverse engineer it to figure out how to do it.

– November 22, 2020 11:25 AM by Dustin Ormond