Showing posts with label Games. Show all posts
Showing posts with label Games. Show all posts

Saturday, December 28, 2024

Excel Pong Game

In this post we recreate the Arcade Pong game in Excel using VBA macros. Shape objects are used for the two paddles and the ball. Movement is achieved using the Windows Timer API (SetTimer function) that calls a moving procedure repeatedly. The ball position is then updated as per the value in increment variables for row and column. We move the paddle using keyboard or mouse. Computer’s move follows closely the position of the ball at any time. Not easy to beat!


Tuesday, June 28, 2022

Excel Match Pairs

Match Pairs is a fun game and great exercise for your brain. In this post we learn to create the game in Excel using VBA macros. As an example, we will match pairs of teams in the Spanish football premier league La Liga. The macros create a random configuration of teams, cover the cells of the game board, and let users pick cells to show the hidden team. The goal of the game is to match 12 pairs of teams in the shortest time possible and with the lowest number of moves. We are going to see how to create a simplified version with numbers first, and the full game with pictures of the teams next. You can also play Match Pairs La Liga online here.


Tuesday, March 8, 2022

Excel Candy Crush

Have you ever played Candy Crush? In this post we see how to create the game of Candy Crush in Excel using VBA macros. It’s all about moving and copy or cut shapes on the worksheet. The game in Excel is limited compared to the original Candy Crush game, but can be leveraged to have the full functionality also in Excel. The rules are basically the same, and the goal of Excel Candy Crush is to collect as many points as possible to hit the target with the given number of moves allowed.


Saturday, January 15, 2022

Excel Four in a Row

In a previous post we have seen how to create the Tic Tac Toe game in Excel using VBA macros. In this post, we will leverage that VBA project to create the Four in a Row game in Excel. The logic and algorithms are more challenging though, as there are many more combinations in the Four in a Row grid. Check out this article and download the file to play Four in a Row in Excel.

Monday, December 27, 2021

Excel Snake Game

Such a great game! In this post we learn to create the Snake game in Excel using VBA macros. There are many Excel versions of the Snake game on the internet. This one is probably one of the easiest way to do it, and hopefully a good example to help you learn VBA arrays while having fun with the movement of the snake in Excel.

Tuesday, December 14, 2021

Excel Game of Life

In this post we see how to create the Game of Life in Excel using VBA macros. The universe of the game of life is a 2D grid of cells that can either be dead or alive. The Excel worksheet is therefore the ideal layout to create the game. We will use VBA loops and arrays to apply the rules of the game and evolve the initial configuration.

Wednesday, November 24, 2021

Excel Tic Tac Toe

Classic game! In this post we see how to create the Tic Tac Toe game in Excel using VBA macros. Despite its simplicity, Excel Tic Tac Toe is a good example to understand logic and algorithms as the basis of AI behind computer's moves. Play Excel Tic Tac Toe and try to beat the machine!


Monday, March 23, 2020

Excel Geometry Dash

In this post we see how to create the game of Geometry Dash in Excel using VBA time events to generate movement of a shape object along a display full of obstacles. Excel Geometry Dash is a fun game and allows to easily create your own levels by simply filling cells and drawing spikes in a separate Excel worksheet. Try it out!


Wednesday, February 19, 2020

Excel Minesweeper

In this post we learn to make the famous Minesweeper game in Excel. It is an excellent opportunity for VBA beginners to understand FOR and DO loops, and IF/ELSEIF/ELSE conditions, as well as some new VBA Events. There is a more complicated logic to open the cells though. Excel Minesweeper is fun and quite similar to the original Microsoft game.

Sunday, January 26, 2020

Excel Battleship Game

This post shows how to create the Sink the Fleet Battleship game in Excel. It is a good example to work with VBA formatting, loops and conditions, having an interesting logic for ships placement. Play Excel Battleship against your computer and beat the code if you can!


Monday, April 23, 2018

Excel Falling Letters

In a previous post we learned to move objects in the Excel worksheet. Here we’ll use the same technique to move text boxes containing letters, thus building the Excel Falling Letters game. Keystroke capture similar to that used in the Excel Tron Game through the Application.Onkey method will be used to check if the falling letter matches the user’s keyboard stroke.


Sunday, February 18, 2018

Excel Tron Game

In this post we code a simple game with movement in Excel. Moving things this way around the worksheets may not be quite necessary for office work Excel purposes but it is fun and can help you learn other stuff such as time events. Once you learn this, you will be able to make any other similar games.


Popular Posts