Introduction: How to Solve Logic Puzzles With Microsoft Excel

About: I like to design and build random things.

You have most likely seen this type of puzzle pop across your online feed. Some are simple enough that you can figure them out in your head. However, as the number of equations increases, the challenge becomes harder. This short tutorial shows you an easy way to solve this type of puzzle using Microsoft Excel. Note that these instructions are for MS Office 2016 but the same logic applies to newer versions of Excel.

Step 1: Solver Add In

Open Excel

Add-ins provide optional commands and features for Microsoft Excel. By default, add-ins are not immediately available in Excel, so you must first install and (in some cases) activate these add-ins so that you can use them.

To enable, do the following:

  • Click the File tab, click Options, and then click the Add-Ins category.
  • In the Manage box, click Excel Add-ins, and then click Go.
  • The Add-Ins dialog box appears.
  • In the Add-Ins available box, select the check box next to the add-in that you want to activate. For this exercise, you want to select Solver Add-In. Click OK.

Step 2: Solver Location

Now that you have installed the add-in, you must access it. From the Main Screen, go to the Data tab. The Solver should be included in the Analysis subsection.

Step 3: Setting Up the Problem

Before writing equations, it is often easier to assign variables to the items. This makes it easier when writing the equations. I used the values shown in this image.

Step 4: Adding Data to Excel

Now it's time to enter the data into Excel. Each line from the introduction picture will be added to the spreadsheet. Column E shows the equations in text format. This step isn't needed but I thought it would help with understanding the process. Column F shows the equations in Excel. Column G is the total from each line (see intro picture). Enter data exactly as shown.

Step 5: Solver

You are now ready to net up the solver. Click the Solver icon (Data => Solver) from Step 2. This will bring up a solver panel.

  • Start by setting the Set Objective to Cell $F$3. For the To value, set the Value Of to 29. This sets both sides of the equation equal to each other.
  • Next, set the By Changing Variable Cells to $D$3:$D$9. This column will fill out during the solving process.
  • Click Add
  • Repeat the process for the remaining equations as shown.
  • You have now filled out all the information required to solve the puzzle.
  • To run the solver, click on Solve

Step 6: Give It a Shot

Did it work? Please comment if you have any questions.