Your puzzle is similar to a Sudoku puzzle. Andy Pope has a downloadable Excelfile which can create and solve Sudoku puzzles. You might be able to adapt itfor your needs. You can find it at: http://www.andypope.info/fun/sudoku.htm