You are on page 1of 8

Solving SUDOKU Using Excel Clyde Key Smashwords Edition Copyright 2012 Clyde Key .

It frustrates me when I get lost trying to solve a puzzle because I can’t read the numbers I’ve jotted on the sides and in the small spaces.xls is not a program that works the puzzles for you.) Since you’re using your computer to fill in the blanks. Note: Your computer must have Microsoft Excel installed to use this spreadsheet. (You will likely soon become proficient enough that you won’t use your computer for most puzzles. particularly for the more difficult puzzles. However many people just don’t ever try them. However. Using a spreadsheet eliminates my problems with legibility. . your entries are completely legible. or they give up easily if they do. this spreadsheet will help you keep track of number possibilities and allow you to see patterns that will help you to solve the puzzles. And you will begin to recognize patterns and develop techniques so you can solve SUDOKU puzzles without any extra helps. the spreadsheet checks that the answers you enter are correct. One reason is that it’s hard to keep track of all the number possibilities. You don’t have to wait for tomorrow’s newspaper to see if you have solved a puzzle correctly.Solving SUDOKU Using Excel SUDOKU puzzles have become quite popular. Solving the puzzles is fun and is also good mental exercise. In addition. SolvingSUDOKU.

row. Then open SolvingSudoku. or whatever will be convenient for you. I suggest including the date in the filename. 2. Except that the apostrophes will not be seen. Then it would be wise to make a subfolder in your folder and save a second copy there in case you accidentally modify or erase the original. The first step is to download the spreadsheet from the link in paragraph 8. and N (not shown here) contain the sums of the digits in the nine sections of the grid. Enter the digits from the puzzle you wish to solve in the appropriate cells. I suggest saving the spreadsheet in a new folder named SolvingSudoku or whatever you wish to name it.xls and click file/save as and save the file in your new folder with an appropriate name—so that you can keep track of it. These are used to check whether the puzzle has been solved correctly when you are finished. For this exercise.1. In each blank cell of the grid. 3. you can enter the digits that are used in the sample as follows: Notice that the cells under each column and after each row of the grid contain the sums of the digits in the columns and rows. M. enter an apostrophe (‘) followed by all of the digits 1-9 that are not contained in the column. The cells under L. or grid section where the cell is located. such as sudoku_12_25_11. At minimum. the sample puzzle will look like this: .

Cell I4 contains the only digit 3 in the row and section. so enter 7 in H8. so enter the digit 6 in that cell. Now look at each column. Delete the digit 4 from cells D7. I7. and G9. so enter the digit 4 without the apostrophe. cell F2 contains the only 4 in its row and section. Your sample puzzle will look like this: Since you now have determined the digits that go into those five cells.4. F9. Look at each column. Then your sample will look like this: . I3. you can delete those digits in the other cells of the same column. For instance. Then you can delete the digit 6 from cells D5 and F5. Cell B5 contains the only digit 6 in the section. and section and see if there are any cells that contain only a single digit. and I8. So select the cell and enter 9 (without the apostrophe this time). In this example. In the example. so enter the digit 1 in cell H9. Cell H9 contains the only digit 1 in that row. so enter the digit 3 in that cell. Cell E8 contains the only digit 1 in that section. row. cell D8 contains only the digit 9. H8. and section and see if any digits are contained only once. Delete the digit 7 from cells H5 and H6. you can delete the digit 4 from cell F9. row or section. Delete the digit 1 from cells H3. so enter 1 in cell E8. and I8. Cell H8 contains the only digit 7 in its row and section. row. and the digit 3 from cells I2.

but there is another combination that will help you to eliminate wrong digits. or section. And column F contains only the digits 2 and 3 in F1 and F9. A way to check your work: The cell at the bottom of each column and at the end of each row contains the sum of digits in the column or row. Whenever there is a pair of cells in a column.Now you can go back to the beginning of step 4 and repeat the process. allowing you to eliminate the digits 2 and 3 from the other cells in that column. row. Then you can continue to repeat the instructions in step 4 until the puzzle is solved. they are the only possible locations for those digits so that will allow you to eliminate them in the other cells of the column. B9=9. so you can eliminate all the other digits 5 and 8 in that column and section. so you can eliminate those digits in the other cells of row 5. or section that contain only the same two digits. row. the cells will always contain 45 since the sum of digits 1 through 9 is 45. If the puzzle is solved correctly. So that you can check your work. . D8=9. D9=4. you have identified more cells that are positively proven. cells A5 and A6 contain the digits 5 and 8. and G6=7. M. Your sample will look like this: 5. or section. the cells under L. Row 5 also contains only the digits 5 and 8 in A5 and H5. You can continue to solve the puzzle by repeating the instructions in step 4. Then you can delete those digits from the other cells in the same column. For instance. row. the complete solved puzzle is here: 6. You see that by eliminating some possible digits. In addition. so enter those digits. and N contain the sums of the digits in the sections that correspond to each.

row. or section—then you must go back to the original puzzle and continue with the other digit in that cell. The other way is to pick a cell with only two choices and think ahead to determine which is the right answer in that cell. we can work out most of the cells before we see that row 7 contains the digit 3 in two different cells. This technique will still work to help solve the puzzle. this is a puzzle that seems to have come to a dead end at this point: If we select the digit 4 for cell B1. You have an even chance of picking the right answer. you may reach a dead end. the digit 4 is the wrong answer for cell B1. like this: (a) Right click on the Sheet 1 tab at the bottom of the screen. Now. If you picked the right digit. when working with a very difficult puzzle. select a cell that has only two possible digits. Don’t despair because there are still ways you can attack the problem. we really haven’t but have just failed to see all the possibilities. You have eliminated all the digits you can.7. But if reach the point where the puzzle is obviously wrong —such as finding two of the same digit in a column. (c) Click Create a Copy and OK. so continue to solve the puzzle by eliminating digits. That’s very difficult. on the copy. So we will try again with the digit 7 in cell B1: . you can solve the puzzle. For example. But first you need to make a copy of your puzzle to work with. I should note that most of the time when we believe we’ve reached a dead end. and you can’t see any more. (b) Click on Move or Copy. Therefore. There are a couple of approaches to take in solving the problem. but it’s good exercise even if you wind up using the first technique. Oops! What if I come to a dead end and I still can’t solve the puzzle? Occasionally.

and sections add up to 45. you can enter a puzzle in SolvingSudoku.xls and then protect those cells. . columns. columns.Now all of the rows. and sections as soon as you determine the correct digit for a given cell. and sections add up to 45 so we can see that the puzzle is solved correctly. so you can make changes if you wish. Don’t worry about it if your solution doesn’t match the published solution as long as all of your rows. you can copy and paste this link in your browser address window: This will make it easier to avoid overwriting the puzzle you’re trying to solve. it would be wise to save the original and use a copy with the filename changed so you can recover if you accidentally delete a feature or make an unwanted change. • You can usually solve a puzzle quicker if you delete wrong digits from rows. • The spreadsheet is designed with protected cells so that you will not overwrite the program. If you do. the protection is not password protected. 8. click on File and then click on Download. Downloading: Click here to download SolvingSudoku. There are some patterns of digits that will allow more than one solution that will work. window opens on your browser. this is not always right. columns. If you have downloaded the rtf or pdf version and the hyperlink does not work well. this is not necessary.xls. However. Miscellaneous: • If you are familiar with using Excel. You should note that even though some puzzle writers insist that there is only one possible correct answer to each puzzle. When the google.