Excel Jigsaw Solver: What Works and How to Build One

How-to basics · Updated November 18, 2026

Excel does not include a one-click solver for picture jigsaws or jigsaw Sudoku. For a jigsaw Sudoku, you can use a worksheet to record the puzzle, check entries with formulas, and apply solving logic; a VBA backtracking macro can automate the search. For a picture jigsaw, Excel can help organize pieces, but it cannot identify and assemble them from an image on its own.

What people mean by an Excel jigsaw solver

“Jigsaw” can refer to two very different puzzles. A picture jigsaw is made of interlocking pieces that form an image. A jigsaw Sudoku, also called an irregular Sudoku, uses a 9-by-9 number grid like standard Sudoku, but its nine regions have irregular outlines rather than the familiar 3-by-3 squares. The right Excel approach depends on which puzzle you have.

Excel is a spreadsheet, not a dedicated puzzle-solving application. It can store the puzzle and carry out calculations, and it can run a custom macro. That makes it useful for building a solver or checking a proposed solution, but it does not provide a built-in command called “Jigsaw Solver.” It is also important not to confuse a jigsaw Sudoku with the Solver add-in: Solver is an optimization tool, not a general-purpose puzzle solver.

What Excel’s Solver add-in can and cannot do

Solver searches for values that meet constraints while optimizing an objective, such as maximizing a total or minimizing a cost. It is useful for many planning and allocation problems. A Sudoku solution, by contrast, must satisfy a collection of uniqueness rules, and there is usually no meaningful objective to optimize. You would first have to translate the puzzle into decision variables and constraints; simply opening Solver will not solve a grid.

For a small, custom puzzle model, Solver may be useful if the model is designed appropriately. But a complete Sudoku model is cumbersome to build in the standard worksheet interface, particularly when the regions are irregular. Solver also does not read clues from a picture or infer the region boundaries for you. If you want to try the add-in in Microsoft 365 for Windows, enable it through File > Options > Add-ins, select Excel Add-ins in the Manage box, choose Go, and check Solver Add-in. After it is enabled, look for Solver on the Data tab. On a Mac, enable the add-in through Tools > Excel Add-ins; menu placement can vary by Excel release.

Set up a jigsaw Sudoku worksheet

A clear worksheet separates the puzzle values from the map of the irregular regions. For example, use B2:J10 for the 9-by-9 puzzle and B13:J21 for a matching region map. Enter the given digits in the puzzle area, leaving empty cells blank or entering zero consistently. In the map, label every cell with a region number from 1 to 9. All nine cells belonging to the same irregular region receive the same label.

Before using formulas, check the map carefully. Each region should contain exactly nine cells, and the labels must correspond to the intended puzzle. A mistyped label can make a correct solution appear invalid or let an incorrect one pass. Add borders to the puzzle grid, and use conditional formatting or cell fill colors to make each region easier to distinguish. Keep the region labels visible while you work, or place them beside the puzzle if the cells themselves need to remain uncluttered.

For easier entry, select B2:J10 and use Data > Data Validation to restrict entries to whole numbers from 1 through 9. Leave blanks permitted if you want unsolved cells to stay empty. Excel’s validation prevents many accidental entries, but it does not enforce Sudoku rules: it will not, by itself, stop the same digit appearing twice in a row, column, or region.

Use a formula to flag rule conflicts

With the puzzle in B2:J10 and the corresponding region labels in B13:J21, enter the following formula in a separate checking grid aligned with the puzzle. For example, put it in L2 for the value in B2, then copy it across and down to cover the 9-by-9 area. The relative references to the current cell and its region label move as you copy; the puzzle and region ranges stay fixed where needed.

=IF(B2="","",IF(OR(COUNTIF($B2:$J2,B2)>1,COUNTIF(B$2:B$10,B2)>1,SUMPRODUCT(($B$13:$J$21=B13)*($B$2:$J$10=B2))>1),"Conflict","OK"))

The formula returns a blank for an empty puzzle cell, “Conflict” when its value occurs more than once in its row, column, or mapped region, and “OK” otherwise. In this layout, the mapping cell for B2 is B13; when you copy the formula to the cell beside C2, the region reference shifts to C13. The check is a validator, not a solver: it does not determine which digit belongs in a blank. It also does not check whether every cell is filled or whether the region map itself has nine cells per label.

How to solve the grid once it is entered

For a human solving the puzzle, the worksheet can make ordinary Sudoku techniques easier to track. Start by listing the digits that are possible in each empty cell, based on its row, column, and irregular region. Then look for a cell with only one candidate, or a digit that can fit in only one cell within a row, column, or region. Recheck the conflict indicators after each entry.

  • Work through each irregular region, noting which digits are already present and which cells remain available for missing digits.
  • Use candidate notes in adjacent cells or a separate candidate table; avoid treating a conflict-free partial grid as proof that a digit is logically forced.
  • After an entry, update the affected row, column, and region. A region’s shape changes where it crosses the grid, but its label—not its appearance—defines its membership in the workbook.
  • When the grid is complete, confirm that every row, column, and region contains each digit from 1 to 9 exactly once.

Excel formulas can show candidates or highlight duplicates, but a dependable automatic solver needs a search procedure as well as rule checks. Candidate formulas can become difficult to maintain when a puzzle changes, so a separate, well-documented solver is often a better choice if you solve many grids.

When a VBA solver makes sense

A custom VBA macro can solve a jigsaw Sudoku by trying a permitted digit in an empty cell, checking the row, column, and region, and then continuing to the next empty cell. If a later cell has no valid choice, the macro backs up, removes the earlier trial digit, and tries another. This recursive backtracking method is a standard way to search a Sudoku grid; the irregular regions are handled by consulting the region map rather than assuming 3-by-3 boxes.

Such a macro needs clear assumptions: for example, puzzle values in B2:J10, numeric region IDs in B13:J21, and blanks or zeroes for empty cells. It should reject duplicate givens, confirm that the region map is valid, and report whether it found no solution or more than one solution where that distinction matters. A basic macro may find one valid completion without proving uniqueness. VBA is available in desktop Excel, while Excel for the web cannot create, run, or edit VBA macros. On a Mac, VBA support exists in desktop Excel, though some features and controls differ from Windows.

Macros can change workbook cells and cannot be undone with Ctrl+Z. Save a copy of the workbook before running a solver macro, and only enable macros in files you trust. If you do not want to maintain code, a dedicated Sudoku application or a solver designed for irregular Sudoku is usually simpler.

Why picture jigsaws are a different problem

A picture jigsaw solver must identify pieces in photographs, estimate their outlines and colors, and determine which edges fit together. A spreadsheet can record piece IDs, edge colors, dimensions, or proposed neighbors, but ordinary cell formulas do not perform image recognition or geometric matching. You would need image-processing software or a purpose-built jigsaw-solving program to do the visual analysis.

Excel may still help with a manual inventory. A table can record each piece’s ID, dominant colors, edge types, and a note about a recognizable image feature. That can be useful for sorting a large puzzle, but it is an organizational aid, not an automatic assembly solution. If the goal is to solve a photograph of a jigsaw, choose software that explicitly supports image input and piece matching rather than expecting the Solver add-in to do it.

Common mistakes and useful alternatives

The most frequent setup mistake in an irregular Sudoku sheet is entering the region map incorrectly. Another is relying only on row and column checks: that can leave a duplicate inside an irregular region undetected. A third is assuming that Solver understands Sudoku’s rules without a carefully designed model. The add-in follows the constraints you give it; it does not know puzzle conventions automatically.

For one puzzle, a printed grid, pencil notes, and the conflict-checking sheet may be enough. For repeated jigsaw Sudoku solving, use a dedicated solver or a macro that validates its input and explains its result. For standard Sudoku, many existing tools are readily available, but check that an app explicitly supports irregular regions before entering a jigsaw Sudoku. For a picture puzzle, use a picture-jigsaw tool. The best option depends on puzzle type, how often you solve, and whether you need a learning aid or a fully automatic answer.

Frequently Asked Questions

Can Excel Solver solve a jigsaw Sudoku automatically?
Not out of the box. Solver is an optimization add-in, so you would need to build a suitable constraint model. A purpose-built solver or a VBA backtracking macro is generally a more direct approach.

Can I solve a picture jigsaw in Excel?
Excel can help catalog pieces and record observations, but it does not automatically recognize and match pieces from an image. Use software made for picture-jigsaw analysis if you want image-based solving.

Does the formula above fill in missing numbers?
No. It flags duplicate entries in a row, column, or mapped region. It checks a partial grid; it does not calculate candidates or choose a solution for empty cells.

Can I use the workbook in Excel for the web?
You can use ordinary worksheet cells and formulas in Excel for the web, though some interface details differ. VBA macros cannot be created, edited, or run there; use desktop Excel or another solver for a macro-based approach.

How do I know the completed answer is valid?
Check that each of the nine rows, nine columns, and nine mapped regions contains the digits 1 through 9 once each. Also confirm the original clues have not been changed. A conflict-free grid is not enough if some cells are still blank.

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.