Saturday, November 16, 2024

Excel Simple Sudoku Solver

There are many different ways to solve a Sudoku puzzle with a computer. A previous post explained how to solve Sudoku puzzles with pencil marks and solving techniques (as a human would do), and also using brute force with or without backtracking, something only a computer can do. However, that was all too advanced and created some confusion among readers. In this post, we take a step back and use a very basic solving algorithm, which is probably the simplest way to solve a Sudoku puzzle with a computer. The algorithm applies basic logic to find unique occurrences for each puzzle gap. This will only solve Sudoku puzzles of low and medium difficulty though (maybe some difficult too).


Friday, May 24, 2024

Excel Follow Cursor

There are a few ways to track the position of the mouse cursor in Excel. However, if we want to react to mouse movement, we need to set a routine that monitors the position all the time and that’s very CPU-intensive. Another possibility is using one of Excel’s objects that allow mouse events. That’s the case of charts, for example, as well as ActiveX controls, among others. In this post we see how to use an ActiveX image in the background of the worksheet to capture mouse movement and follow the cursor position.

Saturday, January 6, 2024

Excel Word Search Pro

Excel Word Search Pro is the ultimate word search generator for Microsoft Excel that allows to fully customize word search puzzles to create amazing KDP puzzle books. Word Search Pro for Excel creates puzzles of any size for themes of words and alphabet in any given language. Puzzles and solutions can be formatted as wished, solution answers being highlighted in bold, circled, or shadowed in any color or multi-color. Word Search Pro for Excel allows to save each puzzle as picture and export directly to Microsoft Word to easily create your KDP puzzle book.

Tuesday, November 28, 2023

Excel Circle Packing

Excel Circle Packing is a fun VBA application to play around with circles and try to fit them all inside the smallest possible square in Excel. The program helps players fit circles more easily by adjusting their position when near the edge of the square or avoiding overlapping with other circles when possible. Depending on the number of circles selected, packing them inside the square without looking at the solution can be quite challenging. However, if you give up, there are solutions for some of the combinations in this other page.


Tuesday, September 19, 2023

5 Ways To Get Data From Google Sheets In Excel

There are several ways to import data from Google Sheets into Excel. In this post we review five different methods to import data from Google Sheets using Excel VBA. One way or another, there is always a HTTP request to the Google web resource that connects with the Google spreadsheet. The main difference between the various methods presented here lies on the Google web resource/API URL used to access the data. Another important difference is the format of the output data. Some methods allow to get only public data, while other may also let import private or restricted data.

 

Saturday, August 26, 2023

Excel PixelArt Puzzle

Excel PixelArt Puzzle is a VBA program that converts a pixel art representation created in Excel into a puzzle. It does so by creating pictures for each puzzle piece out of the target range spanning the desired number of cells from the pixel art (cells represent pixels). Puzzle pieces are placed randomly on the same range or next to the pixel art. Once completed, the puzzle pieces can be moved by clicking on a piece and a position or another piece to be exchanged with. Continue reading this post to see how all that works and go down to the bottom of the post to download Excel PixelArt Puzzle.


Wednesday, May 24, 2023

Excel Join The Dots

There are many different types of shapes in Excel. This post shows how to design diagrams to join the dots and solve it adding Excel free-forms programmatically. We can use it to design a pattern of numbers to create a custom shape or play to join the dots. The basics of adding and manipulating shapes with Excel VBA are covered in this other page: Shape Object. In this post we focus on the free-form shape.


Tuesday, March 28, 2023

Excel Ribbon Customization

We can easily customize the Excel ribbon manually and hide certain tabs or add new tabs and buttons. However, the customization does not persist if we share the Excel workbook with other users; it only applies to the local copy of Microsoft Excel. We need to modify the XML code to export the customization with the file. That’s especially helpful when creating Excel add-ins. In this post we see how to customize the ribbon manually and locally, and how to modify the XML code to customize the ribbon programmatically and permanently for a given workbook. Find the list of ribbon image icons in this other page: Microsoft Office ImageMSO Icons


Wednesday, February 22, 2023

Excel Standalone Calculator

Creating a calculator app is a great example to practice UI design and logic programming. In this post, we see how to do that in Excel using VBA macros. The calculator is a Userform with a text box for the display and several buttons for numbers, operators, and other functions. Excel Calculator is standalone and appears independently with Excel running in the background.

 

Thursday, January 26, 2023

Excel Maze Generator Kruskal

In a previous post, we have seen how to generate a maze in Excel using VBA macros and following the randomized depth-first search algorithm. In this post, we see how to create a maze in Excel using the randomized Kruskal’s algorithm. This other method allows creating larger maze structures, faster and without halting or breaking the code. On the other hand, it renders simple maze patterns that are easier to solve compared to patterns of similar size created with randomized depth-first search. Therefore, it is often used to create much larger maze structures in Excel.


Saturday, November 5, 2022

Excel Analog Clock

What time is it? Learn how to create a classic analog clock in Excel using VBA macros. We use shapes to create the frame and other components of the clock, including also the clock arrows or pointers. Then we rotate the arrows to indicate the current time, and keep updating the position by setting a loop or flow with VBA time functions. The clock arrows are lines grouped together with an oval shape to create the rotation of the classic analog clock in Excel.


Friday, October 14, 2022

Excel Nonogram Maker and Player

Do you like logic games? In this post we see how to create nonograms in Excel using VBA macros. The macros described here and the file attached allow to create custom nonograms or generate random puzzles, and then save them to another (hidden) sheet. A different tab allows to play existing (saved) nonograms or randomly generated puzzles. The nonogram player checks the progress and allows to confirm the result or display the solution. We can also change the size of the nonogram puzzles to reach different levels of difficulty. Continue reading this post to learn how the program works and download the file to play nonograms in Excel.


Saturday, September 24, 2022

Excel Data Export To Google Sheets

Exporting data from Excel to Google Sheets can be automated with VBA macros. In this post we see how to set up a Google spreadsheet to receive data from Excel through a Google Form. The macro to upload or export Excel data to Google Sheets is fairly simple and is explained in this other post (Upload Data To Google Sheets). This article focuses on the process of adding a Google Form to the Google spreadsheet, adding the fields to the Google Form, and getting the necessary arguments to build the URL link needed to send the server request.


Thursday, August 4, 2022

Excel Macros in Google Sheets

Yes, it's possible! In this post we see how to create Excel macros in Google Sheets, and more specifically, we will compare the two leading spreadsheet applications, side by side, in regards to automation and the creation of macros. It is possible to replicate Excel macros in Google Sheets in many cases, yet there are some limits to achieve everything we do in Excel. On the other hand, macros in Google Sheets allow to easily integrate with other Google APIs and web resources, and can even be taken to another level to create entire web applications. However, the programming language we use to code the macros is quite different altogether. Microsoft Excel uses Visual Basic for Applications (VBA), while Google Sheets uses Google Apps Script. This post will help you leverage your Excel VBA knowledge to quickly get you up to speed with creating macros in Google Sheets.


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, May 17, 2022

Excel Standalone Application (Mortgage Calculator)

In this post we see how to create a standalone Excel application or form using VBA macros. The application is built on a UserForm that will show up on its own when opening the file; the Excel workbook will be hidden in the background. This is useful to create independent Excel apps or forms connected to data and/or formulas and calculations in the main Excel workbook. As an example, we will create a simple mortgage calculator in Excel. The mortgage information is directly entered in the Excel app or form, with the option to calculate the scheduled mortgage payment. The calculation is actually happening through a formula in the hidden worksheet (it could also be done with macro code instead).


Saturday, May 7, 2022

Excel Multiple Dependent Validation

Adding a drop-down to a cell in Excel (also known as validation) is fairly straight-forward. But adding interdependent drop-downs is slightly more difficult. In this post we review several methods to create multiple dependent validation lists in Excel. We will start with a classic and simple way to do it that does not require any VBA macros. However, the classic way to create multiple dependent validations is a tedious process and may take some time in order to create the necessary lists, tables, names, etc. Therefore, we will also look into an alternative to create the dependent validation using VBA macros. In this case, the macro could be adapted to accommodate as many fields as needed, thus being ideal for multiple dependent validation. As an example, we will create a validation list to select countries, regions, and cities of the world.


Wednesday, April 20, 2022

10 Ways to Run a Macro in Excel

Come along to see 10 different ways to run a VBA macro in Excel. This could be a recorded macro, or a macro you’ve created or copied into a standard module. The macro must be a public procedure in a public module, otherwise most of the methods won’t work. Any standard module is public unless specified otherwise. A public procedure starts with Sub or Public Sub, as opposed to Private Sub. 


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.


Wednesday, March 2, 2022

Excel Sudoku Generation Techniques: An Overview

There has been some interest and several questions around the macros used to generate and solve Sudoku puzzles published in this blog. In this post, we will review the different methods available to generate Sudoku puzzles with Excel VBA (or any other programming language), while the macros to solve Sudoku puzzles have been covered in this previous post: Excel Sudoku Solver. There are basically two ways to generate Sudoku puzzles with a computer. We can use either incremental or decremental generation.


Thursday, February 10, 2022

Excel Sudoku Solver

Stuck with a difficult Sudoku? Get Excel Sudoku Solver and learn the principles of solving Sudoku puzzles in Excel using VBA macros. The solver uses logic deduction rules to resemble the human solving ability. Among these, we will see macros to get the pencil marks, solve singletons, find hidden singles, and find pairs, triplets, and quads, to eliminate possibilities. All that code is available in the simplified version of Excel Sudoku Solver, which solves Sudoku puzzles of medium difficulty. You can also download the full version of the Excel Sudoku Solver that uses more advanced techniques and a backtracking algorithm to crack puzzles of any difficulty level.

Saturday, January 29, 2022

Excel Matrix Digital Rain

Matrix digital rain is the programming code featured in the Matrix series. In this post we see how to create the Matrix digital rain in Excel using VBA macros. The macro uses the SetTimer function that we have seen in previous posts to change the position of the characters and create the falling effect of the digital rain from the Matrix movie. The code keeps changing and fading away while falling using a formula to get random characters from a list.

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.

Saturday, December 4, 2021

Excel Maze Generator

Let's see how to leverage a classic algorithm to create a maze in Excel using VBA macros. The method used to generate the maze follows the randomized depth-first search algorithm. The maze caving process in this version of Excel Maze Generator is visual and can be followed directly on the worksheet, in order to help readers better understand how the algorithm works.

 

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!


Friday, April 16, 2021

Excel Sudoku Pro

Excel Sudoku Pro is an improved version of the Excel Sudoku Generator posted in this blog a couple of years ago (Excel Sudoku Generator). It creates random Sudoku puzzles in Excel with four levels of difficulty, tracks resolution time, error, etc. Furthermore, it allows to upload and download Sudoku puzzles to and from the internet to share performance, challenge, and compete, with other users. Now you can also play Sudoku Pro online. Try it out!

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!


Sunday, February 24, 2019

Excel Rubik Cube Puzzle

In this post we see how to create a fun game inspired in Rubik’s Cube with Excel VBA. It’s a very simple macro that gives a chance to go through some formatting properties. Additionally, we will learn to use Events to add some dynamic features to the game. Excel Rubik Cube Puzzle comes with three levels of difficulty and follows some of the algorithms the real cube does.


Saturday, December 15, 2018

Excel Word Search


In this post we see how to build a Word Search generator in Excel. It’s based on very simple VBA code and gives a chance to work with Loops and Strings. The Excel Word Search generator allows you to enter your own themes and words to produce printable-ready puzzles to resolve. The key concept to build the puzzle follows the one we learnt with Excel Sudoku Generator.



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.


Wednesday, February 28, 2018

Excel Circles Movement

In this post we see how to move shapes in a worksheet. This can be useful to build animated spreadsheets, but we will rather create some fun games in Excel instead. It is more powerful than simply moving across the cells as we learned in the previous post. It is as simple as adding shapes in combination with timer events.



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.


Sunday, January 28, 2018

Excel Shift Roster Generator

Find an updated version in this post from Excel Macro Business.

In this article we look at a simple way of automatically creating work shifts schedules in Excel. Nothing we couldn’t do manually but can save some tedious work instead. It’s a good example to understand how to work with different sheets, use loops, simple calculations and format the data with VBA.


Saturday, January 6, 2018

Excel Sudoku Generator

In this post we see how to create Sudoku puzzles with Excel VBA macros. Excel Sudoku Generator creates completely random puzzles with three levels of difficulty. The VBA code uses decremental generation with algorithms to ensure removed numbers do not compromise a unique solution, with the peculiarity of not using any solver to do so. This version of Excel Sudoku Generator was shared for learning purposes and is not the most efficient though. A simpler version has been created to help readers better understand the VBA code: Excel Simple Sudoku Generator. An improved version to create professional Sudoku puzzles is also available for download here: Excel Sudoku Pro. You can also play Sudoku Pro online now!


Popular Posts