Add a Jigsaw Sudoku Solver to Excel

How-to basics · Updated November 21, 2026

To add Solver to Excel for Microsoft 365 on Windows, go to File > Options > Add-ins, choose Excel Add-ins beside Manage, click Go, and select Solver Add-in. Excel does not include a dedicated jigsaw-puzzle solver, though: for a full jigsaw Sudoku, the built-in Solver is too limited for the usual model, so this guide shows how to enable it and how to use the larger OpenSolver add-in for the puzzle.

What You’ll Need

  • Excel for Microsoft 365 desktop on Windows. Solver is a desktop add-in; Excel for the web does not run it. On Mac, Excel has its own Solver add-in, but the OpenSolver download and compatibility can differ, so check the current OpenSolver documentation before relying on it.
  • A jigsaw Sudoku puzzle: a 9-by-9 grid with nine irregular regions, each containing nine cells. Each row, column, and region must contain the digits 1 through 9 once each.
  • For a complete puzzle model, the free OpenSolver add-in and a worksheet that records the puzzle clues and the nine irregular region shapes. Download add-ins only from their official source and follow the publisher’s installation and security guidance.

Step-by-Step

  1. Enable Excel’s built-in Solver first. In Windows Excel, select File > Options > Add-ins. At the bottom of the window, set Manage to Excel Add-ins and select Go. Check Solver Add-in, then select OK. If Excel asks to install the add-in, allow it to finish. Open the Data tab and confirm that Solver appears, usually at the right end of the ribbon. On Mac, use Tools > Excel Add-ins and select Solver if it is listed. The web version does not provide this desktop Solver command.
  2. Decide which kind of jigsaw you mean. Solver is an optimization tool, not a picture-piece matcher. The steps below apply to jigsaw Sudoku, where regions have irregular outlines but the rules are otherwise Sudoku rules. If you mean assembling a photograph from physical jigsaw pieces, Excel has no built-in tool that can infer the piece shapes or solve that puzzle; use a dedicated image-based puzzle app instead.
  3. Record the puzzle and label its regions. Make a 9-by-9 input grid on a worksheet and enter the given digits, leaving empty cells blank. In a second 9-by-9 grid, label every cell with its region number from 1 to 9. Check that each region label occurs exactly nine times, and that each region is connected and matches the printed puzzle. Keep these two grids separate from the decision cells you will create next. This makes it easier to find a miscopied clue or region later.
  4. Choose a model that fits Excel’s Solver limits. A reliable linear model uses 729 binary decision cells: one yes-or-no variable for every combination of 81 grid positions and nine possible digits. A variable is 1 when that digit is assigned to that position and 0 otherwise. The standard Microsoft Solver included with Excel is limited to 200 changing cells, so it cannot handle all 729 variables in this model. Do not spend time building the full model in standard Solver expecting it to accept it. For this full-size approach, install OpenSolver, which is designed to handle larger linear and integer models.
  5. Install OpenSolver from its official source. Download the Excel add-in from the OpenSolver project’s official website and read its current installation instructions. In Windows Excel, use File > Options > Add-ins, set Manage to Excel Add-ins, and click Go. Choose Browse, locate the downloaded add-in file, and select it; then make sure its checkbox is selected in the add-ins list. If Excel blocks the file or shows a security warning, do not bypass the warning automatically. Confirm that the file came from the official source and follow the publisher’s instructions for enabling it. OpenSolver should add its own ribbon or menu commands. If it does not, close and reopen Excel and check the add-ins list again.
  6. Lay out the 729 variables consistently. Create nine 9-by-9 blocks on a model sheet, one block for each digit from 1 to 9. Use the same cell position in each block to represent that digit in the corresponding puzzle cell. For example, the top-left cell in the digit-1 block represents a 1 in the puzzle’s top-left cell; the top-left cell in the digit-2 block represents a 2 in that same puzzle cell. Mark all 729 cells as binary in the model. Keep a clear label above each block so that the digit-to-block mapping cannot be confused.
  7. Build the constraint totals. Create helper totals that add the appropriate decision cells. For each puzzle cell, add its nine digit choices and require the total to equal 1; this makes exactly one digit occupy that cell. For each row and each digit, add the nine variables across that row in the digit’s block and require 1. Do the equivalent for every column and digit. Finally, for each of the nine irregular regions and each digit, add the nine variables at the cells belonging to that region and require 1. These row, column, cell, and region rules together enforce the jigsaw Sudoku rules. Keep the helper totals on the sheet in clearly labeled sections so you can inspect them if the model fails.
  8. Lock in the printed clues. For a given digit, set that cell’s corresponding decision variable to 1 and the other eight digit choices for the same cell to 0. You can either enter those fixed values directly in the model or add equality constraints that fix them. Do not merely color the given cells: Solver must be told that those values cannot change. Check every clue against the original puzzle before solving.
  9. Set up and run OpenSolver. Select the OpenSolver model command and set the objective to any single helper cell, with the target set to 0, because the puzzle is a feasibility problem rather than a score-maximization problem. Set the changing cells to all 729 decision cells. Add constraints requiring every cell, row-digit, column-digit, and region-digit helper total to equal 1, and mark the decision variables as binary. Include the fixed clue values as described above. Use OpenSolver’s solve command and wait for its completion message. The exact labels and model-dialog layout can vary between OpenSolver releases, so use the current add-in instructions if a command has moved.
  10. Read the answer back into a grid. For each puzzle position, find which of its nine digit variables is 1 and write that digit in a separate solution grid. A position should have exactly one selected digit. Then independently verify that every row, column, and irregular region contains 1 through 9 once each, and that all original clues remain unchanged. Save a copy of the workbook with the solved grid and model so you can review how the result was produced.

Common Mistakes

The most common mistake is assuming that enabling Solver automatically adds a jigsaw Sudoku feature. It only supplies a general optimization engine; the grid, variables, and rules still need to be modeled. Another frequent problem is trying to use the standard Solver with 729 changing cells. Its 200-cell limit prevents this standard binary formulation, regardless of how powerful the computer is.

Incorrect region labels are another source of unsatisfiable models. A region accidentally containing eight cells and another containing ten cannot meet the one-of-each-digit rules. Check the region map before solving. Also make sure the binary condition applies to every decision cell. Without it, a model could return fractional values such as 0.4 and 0.6, which are not valid digit assignments.

Finally, do not mix the given-clue grid with the decision-variable grid. If you change a printed clue while testing, keep the original puzzle intact so you can spot the mistake and restore the correct model.

Tips

Use formatting to make the model understandable: give each digit block a prominent heading, color the clue cells consistently, and label each helper section. Add a small status area showing whether all helper totals equal 1. A non-1 total is a useful signal that the model or result needs checking.

Start with a nearly completed practice puzzle before entering a difficult one. This helps confirm that the variable layout, region map, and constraints work. Keep the original puzzle in a separate worksheet and save a new copy before changing the model. For repeat use, save a clean template with the nine blocks and constraint structure already prepared; replace only the clues and region map for each new puzzle.

If more than one solution is possible, the feasibility model may return any valid solution. That is not necessarily an error. If you need to determine whether a puzzle has a unique solution, solve it once, then add a constraint that excludes that complete assignment and solve again. If another answer appears, the original puzzle was not unique. The exact exclusion constraint depends on how the variables are arranged, so check it carefully before drawing a conclusion.

Troubleshooting

Solver is missing from the Data tab: revisit File > Options > Add-ins, choose Excel Add-ins in Manage, select Go, and check Solver Add-in. Restart Excel if necessary. If you are in Excel for the web, open the workbook in the desktop app instead.

OpenSolver does not appear: confirm that you installed the add-in file using the Excel Add-ins list, that its checkbox is selected, and that you are using a supported desktop version. Reopen Excel. If the add-in is still blocked, consult the official installation notes rather than enabling unknown files or changing security settings at random.

The model reports no feasible solution: inspect the clues for a duplicate digit in a row, column, or irregular region. Then count each region’s cells and check that each clue was fixed in the correct digit block. Review the helper totals and verify that each is built from the intended cells. One wrong region label can make an otherwise valid puzzle impossible.

The result contains fractions or repeated digits: check that all 729 variables are included in the binary restriction and that the model includes every cell, row, column, and region constraint. A missing constraint can allow invalid assignments even if the model reports success. Re-run the validation against the original rules.

The solve takes too long: first verify the model size and that the objective is a simple helper cell set to zero. Confirm that the constraints are linear sums of decision variables and that no unnecessary formulas or unrelated cells are included in the changing range. If the model remains slow, test the template with a simpler puzzle and compare the setup with the current OpenSolver guidance.

Frequently Asked Questions

Is there a built-in jigsaw solver in Excel?
No. Excel provides Solver for optimization problems, not a dedicated jigsaw or Sudoku command. You must build a model or use a purpose-made puzzle-solving tool.

Can the standard Excel Solver solve a full jigsaw Sudoku?
Not with the usual 729-binary-variable model: the built-in Solver’s changing-cell limit is 200. OpenSolver or a separate Sudoku solver is a more suitable route for a full puzzle.

Does this work for an ordinary picture jigsaw?
No. The method is for jigsaw Sudoku, where the pieces are irregular nine-cell regions in a number grid. A picture jigsaw needs image and shape matching, which Excel Solver does not provide.

Can I use Solver in Excel for the web?
The desktop Solver add-in described here is not available in Excel for the web. Open the file in desktop Excel to use the Windows add-in; check current product documentation for other platform options.

Why does Solver find more than one answer?
The clues may allow multiple valid completions, or a constraint may be missing. Verify that every cell, row, column, region, and clue is represented. To test uniqueness, exclude the first complete assignment and solve again.

Can I use Excel’s Solver instead of OpenSolver if I reduce the model?
Possibly, but a reduced model must still enforce every rule correctly and stay within the 200 changing-cell limit. The full binary layout described here does not fit. Avoid removing variables or constraints unless you can prove the smaller model still represents all valid solutions.

Related

Try it: the Date Difference Calculator: days, months, years and weekdays between two dates, with the DATEDIF formulas.

More in How-to basics

Sources: Function behaviour and menu paths: Microsoft Support documentation for Excel. Method & sources

Spotted an error in this guide? Let us know.