8/6/2019 Excel Su Doku
1/18
Top of Form
/w EPDw UKMTM5
Sign in
Home
Microsoft Blog Images
More ...
Microsoft Blog Images
Microsoft Excel 2010The official blog of the Microsoft Excel product team
*Advanced search options...
Search In:
Everything
Date range:
All Time
Search
Search this blog Search all blogs
Common Tasks RSS for Posts
RSS for Comments
Atom
recent posts
The analytics of the World Cup in Excel with PowerPivot
Posted Mon, Jun 28 2010
by Diego Oppenheimer
Excel 2010 Games: Missile Command and Tower Defense
Posted Wed, Jun 23 2010
by Diego Oppenheimer
New Visualization Types in Excel
Posted Thu, Jun 17 2010
by Diego Oppenheimer
Importing Text Files in an Excel Sheet
Posted Thu, Jun 10 2010
http://login.live.com/login.srf?wa=wsignin1.0&rpsnv=11&ct=1278347718&rver=6.0.5286.0&wp=MBI&wreply=http://blogs.msdn.com/b/excel/archive/2008/09/29/building-a-basic-understandable-sudoku-solver-using-excel-iterative-calculation-part-1-2.aspx&lc=1033&id=271611http://blogs.msdn.com/http://blogs.msdn.com/Microsoft_Blog_Images/http://blogs.msdn.com/b/excel/archive/2008/09/29/building-a-basic-understandable-sudoku-solver-using-excel-iterative-calculation-part-1-2.aspxhttp://blogs.msdn.com/Microsoft_Blog_Images/http://blogs.msdn.com/excel/default.aspxhttp://blogs.msdn.com/b/excel/archive/2008/09/29/building-a-basic-understandable-sudoku-solver-using-excel-iterative-calculation-part-1-2.aspxhttp://blogs.msdn.com/b/excel/archive/2008/09/29/building-a-basic-understandable-sudoku-solver-using-excel-iterative-calculation-part-1-2.aspxhttp://blogs.msdn.com/b/excel/archive/2008/09/29/building-a-basic-understandable-sudoku-solver-using-excel-iterative-calculation-part-1-2.aspxhttp://tmp/svn3l.tmp/javascript:WebForm_DoPostBackWithOptions(new%20WebForm_PostBackOptions(%22ctl00$content$ctl00$fragment_5304$ctl01$ctl01$ctl01$SearchButton%22,%20%22%22,%20true,%20%22%22,%20%22%22,%20false,%20true))http://blogs.msdn.com/b/excel/rss.aspxhttp://blogs.msdn.com/b/excel/rsscomments.aspxhttp://blogs.msdn.com/b/excel/atom.aspxhttp://blogs.msdn.com/b/excel/archive/2010/06/28/the-analytics-of-the-world-cup-in-excel-with-powerpivot.aspxhttp://blogs.msdn.com/members/Diego-Oppenheimer/http://blogs.msdn.com/b/excel/archive/2010/06/23/excel-2010-games-missile-command-and-tower-defense.aspxhttp://blogs.msdn.com/members/Diego-Oppenheimer/http://blogs.msdn.com/b/excel/archive/2010/06/17/new-visualization-types-in-excel.aspxhttp://blogs.msdn.com/b/excel/archive/2010/06/17/new-visualization-types-in-excel.aspxhttp://blogs.msdn.com/members/Diego-Oppenheimer/http://blogs.msdn.com/b/excel/archive/2010/06/11/importing-text-files-in-an-excel-sheet.aspxhttp://blogs.msdn.com/members/Diego-Oppenheimer/http://blogs.msdn.com/members/Diego-Oppenheimer/http://blogs.msdn.com/members/Diego-Oppenheimer/http://blogs.msdn.com/http://blogs.msdn.com/http://blogs.msdn.com/Microsoft_Blog_Images/http://blogs.msdn.com/b/excel/archive/2008/09/29/building-a-basic-understandable-sudoku-solver-using-excel-iterative-calculation-part-1-2.aspxhttp://blogs.msdn.com/Microsoft_Blog_Images/http://blogs.msdn.com/excel/default.aspxhttp://blogs.msdn.com/b/excel/archive/2008/09/29/building-a-basic-understandable-sudoku-solver-using-excel-iterative-calculation-part-1-2.aspxhttp://tmp/svn3l.tmp/javascript:WebForm_DoPostBackWithOptions(new%20WebForm_PostBackOptions(%22ctl00$content$ctl00$fragment_5304$ctl01$ctl01$ctl01$SearchButton%22,%20%22%22,%20true,%20%22%22,%20%22%22,%20false,%20true))http://blogs.msdn.com/b/excel/rss.aspxhttp://blogs.msdn.com/b/excel/rsscomments.aspxhttp://blogs.msdn.com/b/excel/atom.aspxhttp://blogs.msdn.com/b/excel/archive/2010/06/28/the-analytics-of-the-world-cup-in-excel-with-powerpivot.aspxhttp://blogs.msdn.com/members/Diego-Oppenheimer/http://blogs.msdn.com/b/excel/archive/2010/06/23/excel-2010-games-missile-command-and-tower-defense.aspxhttp://blogs.msdn.com/members/Diego-Oppenheimer/http://blogs.msdn.com/b/excel/archive/2010/06/17/new-visualization-types-in-excel.aspxhttp://blogs.msdn.com/members/Diego-Oppenheimer/http://blogs.msdn.com/b/excel/archive/2010/06/11/importing-text-files-in-an-excel-sheet.aspxhttp://login.live.com/login.srf?wa=wsignin1.0&rpsnv=11&ct=1278347718&rver=6.0.5286.0&wp=MBI&wreply=http://blogs.msdn.com/b/excel/archive/2008/09/29/building-a-basic-understandable-sudoku-solver-using-excel-iterative-calculation-part-1-2.aspx&lc=1033&id=2716118/6/2019 Excel Su Doku
2/18
by FredK
Solutions to Three Common Problems when UsingVLOOKUP()
Posted Thu, Jun 10 2010
by FredKTags
Analysis Services
Backwards Compatibility
Charting
Conditional Formatting
Excel 2010
Excel Server
File Format
Formatting & Printing
Formulas and functions
Gemini
How To
News / Announcments
Other Improvements
Overview
PDF, Undo, Other Improvements
Performance
PivotTables
Power Tips
Programmability
Rows, Columns, Performance
Sparklines
Tables
UDFs
Undo
Microsoft Office Sites/BlogsMicrosoft Office Sites/Blogs
Microsoft Office 2010 Engineering
The main blog site for all things Office 2010
Office Web Apps
http://blogs.msdn.com/members/FredK/http://blogs.msdn.com/b/excel/archive/2010/06/11/solutions-to-three-common-problems-when-using-vlookup.aspxhttp://blogs.msdn.com/b/excel/archive/2010/06/11/solutions-to-three-common-problems-when-using-vlookup.aspxhttp://blogs.msdn.com/members/FredK/http://blogs.msdn.com/b/excel/archive/tags/Analysis+Services/http://blogs.msdn.com/b/excel/archive/tags/Backwards+Compatibility+/http://blogs.msdn.com/b/excel/archive/tags/Charting/http://blogs.msdn.com/b/excel/archive/tags/Conditional+Formatting/http://blogs.msdn.com/b/excel/archive/tags/Excel+2010/http://blogs.msdn.com/b/excel/archive/tags/Excel+Server/http://blogs.msdn.com/b/excel/archive/tags/File+Format/http://blogs.msdn.com/b/excel/archive/tags/Formatting+_2600_amp_3B00_+Printing/http://blogs.msdn.com/b/excel/archive/tags/Formulas+and+functions/http://blogs.msdn.com/b/excel/archive/tags/Gemini/http://blogs.msdn.com/b/excel/archive/tags/Gemini/http://blogs.msdn.com/b/excel/archive/tags/How+To/http://blogs.msdn.com/b/excel/archive/tags/News+_2F00_+Announcments/http://blogs.msdn.com/b/excel/archive/tags/Other+Improvements/http://blogs.msdn.com/b/excel/archive/tags/Overview/http://blogs.msdn.com/b/excel/archive/tags/PDF/http://blogs.msdn.com/b/excel/archive/tags/PDF_2C00_+Undo_2C00_+Other+Improvements/http://blogs.msdn.com/b/excel/archive/tags/Performance/http://blogs.msdn.com/b/excel/archive/tags/PivotTables/http://blogs.msdn.com/b/excel/archive/tags/Power+Tips/http://blogs.msdn.com/b/excel/archive/tags/Programmability/http://blogs.msdn.com/b/excel/archive/tags/Rows_2C00_+Columns_2C00_+Performance/http://blogs.msdn.com/b/excel/archive/tags/Sparklines/http://blogs.msdn.com/b/excel/archive/tags/Tables/http://blogs.msdn.com/b/excel/archive/tags/UDFs/http://blogs.msdn.com/b/excel/archive/tags/Undo/http://blogs.technet.com/office2010/http://blogs.msdn.com/officewebapps/default.aspxhttp://blogs.msdn.com/members/FredK/http://blogs.msdn.com/members/FredK/http://blogs.msdn.com/members/FredK/http://blogs.msdn.com/b/excel/archive/2010/06/11/solutions-to-three-common-problems-when-using-vlookup.aspxhttp://blogs.msdn.com/b/excel/archive/2010/06/11/solutions-to-three-common-problems-when-using-vlookup.aspxhttp://blogs.msdn.com/members/FredK/http://blogs.msdn.com/b/excel/archive/tags/Analysis+Services/http://blogs.msdn.com/b/excel/archive/tags/Backwards+Compatibility+/http://blogs.msdn.com/b/excel/archive/tags/Charting/http://blogs.msdn.com/b/excel/archive/tags/Conditional+Formatting/http://blogs.msdn.com/b/excel/archive/tags/Excel+2010/http://blogs.msdn.com/b/excel/archive/tags/Excel+Server/http://blogs.msdn.com/b/excel/archive/tags/File+Format/http://blogs.msdn.com/b/excel/archive/tags/Formatting+_2600_amp_3B00_+Printing/http://blogs.msdn.com/b/excel/archive/tags/Formulas+and+functions/http://blogs.msdn.com/b/excel/archive/tags/Gemini/http://blogs.msdn.com/b/excel/archive/tags/How+To/http://blogs.msdn.com/b/excel/archive/tags/News+_2F00_+Announcments/http://blogs.msdn.com/b/excel/archive/tags/Other+Improvements/http://blogs.msdn.com/b/excel/archive/tags/Overview/http://blogs.msdn.com/b/excel/archive/tags/PDF/http://blogs.msdn.com/b/excel/archive/tags/PDF_2C00_+Undo_2C00_+Other+Improvements/http://blogs.msdn.com/b/excel/archive/tags/Performance/http://blogs.msdn.com/b/excel/archive/tags/PivotTables/http://blogs.msdn.com/b/excel/archive/tags/Power+Tips/http://blogs.msdn.com/b/excel/archive/tags/Programmability/http://blogs.msdn.com/b/excel/archive/tags/Rows_2C00_+Columns_2C00_+Performance/http://blogs.msdn.com/b/excel/archive/tags/Sparklines/http://blogs.msdn.com/b/excel/archive/tags/Tables/http://blogs.msdn.com/b/excel/archive/tags/UDFs/http://blogs.msdn.com/b/excel/archive/tags/Undo/http://blogs.technet.com/office2010/http://blogs.msdn.com/officewebapps/default.aspx8/6/2019 Excel Su Doku
3/18
Discussion of the Office Web apps
Outlook team blog
The Outlook team's blog
Word team blog
The Word team's blog
Access team blog
The Access team's blog
Publisher team blog
The Publisher team's blog
The BI Blog
All things Business Intelligence (BI) related at Microsoft
Powerpoint team blogThe Powerpoint team's blog
Project team blog
The Project team's blog
Official Microsoft Office 2010 site
Backstage with Office 2010
Folks within Office talk about building the 2010 release
Visio team blog
The Visio team's blog
Gemini Team Blog
The Gemini team's blog
Office Global Experience
Office Math
Microsoft OneNote
InfoPath team blog
Office Interoperability Office Natural Language team blog
Office Extensibility
Microsoft SharePoint Designer
Microsoft SharePoint Workspace
Office Sustained Engineering
Performance Point team blog
ArchivesArchives
June 2010 (9)
http://blogs.msdn.com/outlook/http://blogs.msdn.com/microsoft_office_word/http://blogs.msdn.com/accesshttp://blogs.msdn.com/microsoft_office_publisherhttp://blogs.msdn.com/bihttp://blogs.msdn.com/powerpoint/http://blogs.msdn.com/projecthttp://www.microsoft.com/office/2010/http://www.office2010themovie.com/http://blogs.msdn.com/visio/http://blogs.msdn.com/gemini/http://blogs.technet.com/office_global_experience/http://blogs.msdn.com/murrays/http://blogs.msdn.com/david_rasmussen/http://blogs.msdn.com/infopath/default.aspxhttp://blogs.msdn.com/dmahugh/http://blogs.msdn.com/naturallanguage/default.aspxhttp://blogs.msdn.com/brian_jones/http://blogs.msdn.com/sharepointdesigner/http://blogs.msdn.com/sharepoint_workspace_development_team/http://blogs.technet.com/office_sustained_engineering/http://blogs.msdn.com/performancepoint/http://blogs.msdn.com/b/excel/archive/2010/06.aspxhttp://blogs.msdn.com/outlook/http://blogs.msdn.com/microsoft_office_word/http://blogs.msdn.com/accesshttp://blogs.msdn.com/microsoft_office_publisherhttp://blogs.msdn.com/bihttp://blogs.msdn.com/powerpoint/http://blogs.msdn.com/projecthttp://www.microsoft.com/office/2010/http://www.office2010themovie.com/http://blogs.msdn.com/visio/http://blogs.msdn.com/gemini/http://blogs.technet.com/office_global_experience/http://blogs.msdn.com/murrays/http://blogs.msdn.com/david_rasmussen/http://blogs.msdn.com/infopath/default.aspxhttp://blogs.msdn.com/dmahugh/http://blogs.msdn.com/naturallanguage/default.aspxhttp://blogs.msdn.com/brian_jones/http://blogs.msdn.com/sharepointdesigner/http://blogs.msdn.com/sharepoint_workspace_development_team/http://blogs.technet.com/office_sustained_engineering/http://blogs.msdn.com/performancepoint/http://blogs.msdn.com/b/excel/archive/2010/06.aspx8/6/2019 Excel Su Doku
4/18
May 2010 (7) April 2010 (6) March 2010 (5) February 2010 (8) January 2010 (8) December 2009 (2)
November 2009 (17) October 2009 (16) September 2009 (15) August 2009 (13) July 2009 (16) June 2009 (3) May 2009 (1) April 2009 (3) March 2009 (3) February 2009 (4) January 2009 (8) December 2008 (3) November 2008 (2) October 2008 (6)
September 2008 (4) August 2008 (5) July 2008 (1) June 2008 (5) May 2008 (4) April 2008 (8) March 2008 (6) February 2008 (5) January 2008 (6) December 2007 (4) November 2007 (4) October 2007 (4) September 2007 (4)
August 2007 (7) May 2007 (1) April 2007 (2) March 2007 (1) February 2007 (2) December 2006 (2) October 2006 (3) September 2006 (18) August 2006 (15) July 2006 (12) June 2006 (14) May 2006 (15) April 2006 (11) March 2006 (12)
February 2006 (11) January 2006 (6) December 2005 (11) November 2005 (17) October 2005 (17) September 2005 (4)
Building a Basic,Understandable Sudoku Solver
http://blogs.msdn.com/b/excel/archive/2010/05.aspxhttp://blogs.msdn.com/b/excel/archive/2010/04.aspxhttp://blogs.msdn.com/b/excel/archive/2010/03.aspxhttp://blogs.msdn.com/b/excel/archive/2010/02.aspxhttp://blogs.msdn.com/b/excel/archive/2010/01.aspxhttp://blogs.msdn.com/b/excel/archive/2009/12.aspxhttp://blogs.msdn.com/b/excel/archive/2009/11.aspxhttp://blogs.msdn.com/b/excel/archive/2009/10.aspxhttp://blogs.msdn.com/b/excel/archive/2009/09.aspxhttp://blogs.msdn.com/b/excel/archive/2009/08.aspxhttp://blogs.msdn.com/b/excel/archive/2009/07.aspxhttp://blogs.msdn.com/b/excel/archive/2009/06.aspxhttp://blogs.msdn.com/b/excel/archive/2009/05.aspxhttp://blogs.msdn.com/b/excel/archive/2009/04.aspxhttp://blogs.msdn.com/b/excel/archive/2009/03.aspxhttp://blogs.msdn.com/b/excel/archive/2009/02.aspxhttp://blogs.msdn.com/b/excel/archive/2009/01.aspxhttp://blogs.msdn.com/b/excel/archive/2008/12.aspxhttp://blogs.msdn.com/b/excel/archive/2008/11.aspxhttp://blogs.msdn.com/b/excel/archive/2008/10.aspxhttp://blogs.msdn.com/b/excel/archive/2008/09.aspxhttp://blogs.msdn.com/b/excel/archive/2008/08.aspxhttp://blogs.msdn.com/b/excel/archive/2008/07.aspxhttp://blogs.msdn.com/b/excel/archive/2008/06.aspxhttp://blogs.msdn.com/b/excel/archive/2008/05.aspxhttp://blogs.msdn.com/b/excel/archive/2008/04.aspxhttp://blogs.msdn.com/b/excel/archive/2008/03.aspxhttp://blogs.msdn.com/b/excel/archive/2008/02.aspxhttp://blogs.msdn.com/b/excel/archive/2008/01.aspxhttp://blogs.msdn.com/b/excel/archive/2007/12.aspxhttp://blogs.msdn.com/b/excel/archive/2007/11.aspxhttp://blogs.msdn.com/b/excel/archive/2007/10.aspxhttp://blogs.msdn.com/b/excel/archive/2007/09.aspxhttp://blogs.msdn.com/b/excel/archive/2007/08.aspxhttp://blogs.msdn.com/b/excel/archive/2007/05.aspxhttp://blogs.msdn.com/b/excel/archive/2007/04.aspxhttp://blogs.msdn.com/b/excel/archive/2007/03.aspxhttp://blogs.msdn.com/b/excel/archive/2007/02.aspxhttp://blogs.msdn.com/b/excel/archive/2006/12.aspxhttp://blogs.msdn.com/b/excel/archive/2006/10.aspxhttp://blogs.msdn.com/b/excel/archive/2006/09.aspxhttp://blogs.msdn.com/b/excel/archive/2006/08.aspxhttp://blogs.msdn.com/b/excel/archive/2006/07.aspxhttp://blogs.msdn.com/b/excel/archive/2006/06.aspxhttp://blogs.msdn.com/b/excel/archive/2006/05.aspxhttp://blogs.msdn.com/b/excel/archive/2006/04.aspxhttp://blogs.msdn.com/b/excel/archive/2006/03.aspxhttp://blogs.msdn.com/b/excel/archive/2006/02.aspxhttp://blogs.msdn.com/b/excel/archive/2006/01.aspxhttp://blogs.msdn.com/b/excel/archive/2005/12.aspxhttp://blogs.msdn.com/b/excel/archive/2005/11.aspxhttp://blogs.msdn.com/b/excel/archive/2005/10.aspxhttp://blogs.msdn.com/b/excel/archive/2005/09.aspxhttp://blogs.msdn.com/b/excel/archive/2010/05.aspxhttp://blogs.msdn.com/b/excel/archive/2010/04.aspxhttp://blogs.msdn.com/b/excel/archive/2010/03.aspxhttp://blogs.msdn.com/b/excel/archive/2010/02.aspxhttp://blogs.msdn.com/b/excel/archive/2010/01.aspxhttp://blogs.msdn.com/b/excel/archive/2009/12.aspxhttp://blogs.msdn.com/b/excel/archive/2009/11.aspxhttp://blogs.msdn.com/b/excel/archive/2009/10.aspxhttp://blogs.msdn.com/b/excel/archive/2009/09.aspxhttp://blogs.msdn.com/b/excel/archive/2009/08.aspxhttp://blogs.msdn.com/b/excel/archive/2009/07.aspxhttp://blogs.msdn.com/b/excel/archive/2009/06.aspxhttp://blogs.msdn.com/b/excel/archive/2009/05.aspxhttp://blogs.msdn.com/b/excel/archive/2009/04.aspxhttp://blogs.msdn.com/b/excel/archive/2009/03.aspxhttp://blogs.msdn.com/b/excel/archive/2009/02.aspxhttp://blogs.msdn.com/b/excel/archive/2009/01.aspxhttp://blogs.msdn.com/b/excel/archive/2008/12.aspxhttp://blogs.msdn.com/b/excel/archive/2008/11.aspxhttp://blogs.msdn.com/b/excel/archive/2008/10.aspxhttp://blogs.msdn.com/b/excel/archive/2008/09.aspxhttp://blogs.msdn.com/b/excel/archive/2008/08.aspxhttp://blogs.msdn.com/b/excel/archive/2008/07.aspxhttp://blogs.msdn.com/b/excel/archive/2008/06.aspxhttp://blogs.msdn.com/b/excel/archive/2008/05.aspxhttp://blogs.msdn.com/b/excel/archive/2008/04.aspxhttp://blogs.msdn.com/b/excel/archive/2008/03.aspxhttp://blogs.msdn.com/b/excel/archive/2008/02.aspxhttp://blogs.msdn.com/b/excel/archive/2008/01.aspxhttp://blogs.msdn.com/b/excel/archive/2007/12.aspxhttp://blogs.msdn.com/b/excel/archive/2007/11.aspxhttp://blogs.msdn.com/b/excel/archive/2007/10.aspxhttp://blogs.msdn.com/b/excel/archive/2007/09.aspxhttp://blogs.msdn.com/b/excel/archive/2007/08.aspxhttp://blogs.msdn.com/b/excel/archive/2007/05.aspxhttp://blogs.msdn.com/b/excel/archive/2007/04.aspxhttp://blogs.msdn.com/b/excel/archive/2007/03.aspxhttp://blogs.msdn.com/b/excel/archive/2007/02.aspxhttp://blogs.msdn.com/b/excel/archive/2006/12.aspxhttp://blogs.msdn.com/b/excel/archive/2006/10.aspxhttp://blogs.msdn.com/b/excel/archive/2006/09.aspxhttp://blogs.msdn.com/b/excel/archive/2006/08.aspxhttp://blogs.msdn.com/b/excel/archive/2006/07.aspxhttp://blogs.msdn.com/b/excel/archive/2006/06.aspxhttp://blogs.msdn.com/b/excel/archive/2006/05.aspxhttp://blogs.msdn.com/b/excel/archive/2006/04.aspxhttp://blogs.msdn.com/b/excel/archive/2006/03.aspxhttp://blogs.msdn.com/b/excel/archive/2006/02.aspxhttp://blogs.msdn.com/b/excel/archive/2006/01.aspxhttp://blogs.msdn.com/b/excel/archive/2005/12.aspxhttp://blogs.msdn.com/b/excel/archive/2005/11.aspxhttp://blogs.msdn.com/b/excel/archive/2005/10.aspxhttp://blogs.msdn.com/b/excel/archive/2005/09.aspx8/6/2019 Excel Su Doku
5/18
Using Excel IterativeCalculation - Part 1/2MSDN Blogs > Microsoft Excel 2010>Building a Basic, Understandable Sudoku
Solver Using Excel Iterative Calculation - Part 1/2
Building a Basic, Understandable Sudoku Solver UsingExcel Iterative Calculation - Part 1/2
Joseph Chirilov30 Sep 2008 1:56 AM
Comments 15
Today's author, Charlie Ellis, a Program Manager on the Excel team, shares a spreadsheet he
built in Excel for solving Sudoku puzzles. The spreadsheet can be found in the attachments at
the bottom of this post.
For those of you who don't already know, Sudoku is a type of logic puzzle (that I was completely
addicted to about three years ago) that requires you to place the numbers 1-9 into a grid
obeying certain rules (lots more information on Sudoku is available on the web).
A while back, a fellow PM on the Excel team, Dan Cory, wrote a spreadsheet for solving Sudoku
puzzles using Excel formulas and made it available on Office Online (here). Dan's spreadsheet
was great in that, unlike many of the Sudoku solving spreadsheets out there, it didn't use any
VBA or other scripting to do the work of solving the puzzles, and relied instead on the iterative
calculation feature of Excel. It's quite cool and has been a popular download, but one thing
about the spreadsheet that I wanted to see if I couldn't improve upon was just how complicated
it is. In fact, Dan made every single cell its own different formula, and he ended up having to
use VBA to create the formulas because maintaining and debugging it without VBA to write all
those different formulas in an automated way was impossible.
As soon as I saw Dan's spreadsheet, I wanted to make my own version of a Sudoku solver that
not only used only formulas, but also one where the formulas were relatively understandable
and there were a small number of distinct formulas. It turned out to not be that tough to build,
but I think I learned a fair amount trying different approaches to the problems of making an
iterative model like this one perform well and at the same time be reasonably maintainable and
understandable. I think it might even have turned up a reasonably useful way at looking atabstraction within formulas given the Excel formula language. I've always wanted to blog about
the process of creating this spreadsheet and about how iterative formulas work to show the
power of Excel's formula language, because it illustrates the usefulness of circular references
and iterative calculation, and because I just think it's an incredible amount of fun so here goes.
Lots of people have created more powerful solvers, many as spreadsheets, some using just
formulas, but I wanted to try to explain how you can go about creating a solver and hopefully
share some formula tricks that people find useful.
Pre-reqs
Creating a spreadsheet for solving a Sudoku isn't entry-level spreadsheeting. In addition to
being pretty good with formulas, you'll need to understand the concept of iteration. Chris Raedid a great job of explaining the topic in his earlier post on Iteration & Conway's Game of
http://blogs.msdn.com/http://blogs.msdn.com/b/excel/http://blogs.msdn.com/b/excel/archive/2008/09/29/building-a-basic-understandable-sudoku-solver-using-excel-iterative-calculation-part-1-2.aspxhttp://blogs.msdn.com/b/excel/archive/2008/09/29/building-a-basic-understandable-sudoku-solver-using-excel-iterative-calculation-part-1-2.aspxhttp://blogs.msdn.com/b/excel/archive/2008/09/29/building-a-basic-understandable-sudoku-solver-using-excel-iterative-calculation-part-1-2.aspxhttp://blogs.msdn.com/members/Joseph-Chirilov/http://blogs.msdn.com/members/Joseph-Chirilov/http://search.live.com/results.aspx?q=how+to+play+sudokuhttp://office.microsoft.com/en-us/templates/TC100809721033.aspxhttp://blogs.msdn.com/excel/archive/2007/11/02/iteration-conway-s-game-of-life.aspxhttp://blogs.msdn.com/members/Joseph-Chirilov/http://blogs.msdn.com/http://blogs.msdn.com/b/excel/http://blogs.msdn.com/b/excel/archive/2008/09/29/building-a-basic-understandable-sudoku-solver-using-excel-iterative-calculation-part-1-2.aspxhttp://blogs.msdn.com/b/excel/archive/2008/09/29/building-a-basic-understandable-sudoku-solver-using-excel-iterative-calculation-part-1-2.aspxhttp://blogs.msdn.com/members/Joseph-Chirilov/http://search.live.com/results.aspx?q=how+to+play+sudokuhttp://office.microsoft.com/en-us/templates/TC100809721033.aspxhttp://blogs.msdn.com/excel/archive/2007/11/02/iteration-conway-s-game-of-life.aspx8/6/2019 Excel Su Doku
6/18
Life, so I'm not going to repeat that, and I'll simply assume you already understand iteration.
Second, we're going to make extremely heavy use of named ranges, and for the stuff I'm doing,
the new name manager is very helpful (see Formula building improvements Part 4:
Defined Names for some information about this) and I'm going to assume working knowledge
of it and of named ranges generally (though I'm going to show some tricks which may be new
to even experienced formula users). Finally, you'll need to at least be familiar with arraynotation in Excel.
Setting up the boards
For those I haven't lost already, I'm going to start by creating a series of boards very much like
the ones that Dan Cory used: one 9x9 board for my input, one 9x9 board for the solution, and a
27x27 board for the possible values in each box. I do this by changing the row height, column
width, font, and zoom such that all the cells are small squares and then applying borders and
fills to get the following:
The input and solution boards are reasonably straightforward (the input board is the one in the
top left where you'll type in a puzzle to be solved, the solution board is where the correct
answer hopefully shows up). The board with possible values, which I'll call the valid values
board, is a bit trickier. It is 27x27 because each box in the input and solution boards is
represented by a 3x3 set of cells in the valid values board. Each of these nine cells represents
whether one of the numbers 1-9 is still in the running to be the actual value for the
corresponding box of the solution board and the set of possible values for a given cell in the
input/solution cell is the set of all the numbers in a single 3x3 "big cell" that are not blank. If it
http://blogs.msdn.com/excel/archive/2007/11/02/iteration-conway-s-game-of-life.aspxhttp://blogs.msdn.com/excel/archive/2007/11/02/iteration-conway-s-game-of-life.aspxhttp://blogs.msdn.com/excel/archive/2005/10/21/483661.aspxhttp://blogs.msdn.com/excel/archive/2005/10/21/483661.aspxhttps://blogs.msdn.com/blogfiles/excel/WindowsLiveWriter/BuildingaBasicUnderstandableSudokuSolver_13F2D/image_2.pnghttp://blogs.msdn.com/excel/archive/2007/11/02/iteration-conway-s-game-of-life.aspxhttp://blogs.msdn.com/excel/archive/2005/10/21/483661.aspxhttp://blogs.msdn.com/excel/archive/2005/10/21/483661.aspx8/6/2019 Excel Su Doku
7/18
isn't already, the purpose/use of this board should become clear later. For now, let's fill in all the
possible values from one to nine in each of these big cells.
Filling in the valid value board
We want to do this by creating a single formula that will fill in the various numbers 1-9 based on
which row and column the formula sits in, and then we'll later add logic to blank out thenumbers that aren't valid. This formula is a little more complicated than the average
spreadsheet formula, so I'll first give the whole formula and then break it down. This looks like
the following:
= MOD(COLUMN(A1)-1,3) + 1 + MOD(ROW(A1)-1,3)*3
When this is entered into the top-left cell of the valid values board and then filled into the entire
valid values board, it gives the following results:
Note that you'll want to do the filling in with either Paste Special | Formulas or CTRL-Enter
because otherwise you'll mess up all the pretty formatting.
Breaking this formula down, ROW and COLUMN return (duh) the row or column of the reference
passed to them as a number. Passing these functions A1, as in this formula, means they'll give
us a number that starts at one and goes up. The first part of the formula uses the modulus
function to transform the column numbers given by COLUMN into the numbers 0-2, and then
adds one to get 1-3. To this we add a 0, 3, or 6, depending on the row number by using the
modulo function on the result of the ROW function.
Next, because that's a bit of a gnarly formula to have sitting around, and we're going to have to
use it all over the place, we're going to take this formula and move it out of the cell and into a
named range. This allows us to abstract away all of the logic for this formula into a single,
understandable name. For lack of a better name, I'm going to call it "onetonine" and it will have
the same exact formula we just created. Because the context for the relative references (i.e.
what they take as being the current cell) is determined by what cell you're in when you create
https://blogs.msdn.com/blogfiles/excel/WindowsLiveWriter/BuildingaBasicUnderstandableSudokuSolver_13F2D/image_4.png8/6/2019 Excel Su Doku
8/18
the named range, it's critical that you start off by selecting cell A1, then create the new named
range, so that your formula works everywhere within the sheet.
This is also why we allow gutters of three rows and three columns around all the boards.
Now we can take our new name and test it out in the board, like so:
Here CTRL+Enter is by far the easiest way to set the formula for all the cells in the valid values
board. First select the whole board, then type in the formula, and instead of pressing Enter, just
hit CTRL+Enter to fill the formula you just typed into all the cells (without messing up their
formatting).
Setting up the solution board
We're going to want to base what valid values are left for a given box on what our current
solution looks like (as opposed to the input), but in order to do that, we need something in the
solution board. To begin with, at least, the solution will definitely contain all of the numbers in
boxes from the input board. Let's start off by doing this in the simplest possible way, while
catching the case of blanks. In the solution board, let's make the cells there all simply equal the
corresponding cell in the input board using relative references unless the input cell is blank. The
absolute easiest way to do this is with the following formula (shown in the form in which it
would be entered into cell D16):
=IF(D4,D4,"")
https://blogs.msdn.com/blogfiles/excel/WindowsLiveWriter/BuildingaBasicUnderstandableSudokuSolver_13F2D/image_8.pnghttps://blogs.msdn.com/blogfiles/excel/WindowsLiveWriter/BuildingaBasicUnderstandableSudokuSolver_13F2D/image_6.png8/6/2019 Excel Su Doku
9/18
Again, use CTRL+Enter to fill this into the appropriate cells. Now that we have the base thing
working, let's make it more re-usable and meaningful by using named ranges.
As we did with the name onetonine, let's abstract the concept of referring to the correct input
cell from any cell in the solution board and turn that into a name. We'll need to do something
similar for all the boards at some point, so we'll start by making named ranges for each of the
boards (I chose in_board, sol_board, and val_board)and then a name to go from the solution
board to the input board (in_cell_from_sol) which is simply =Main!D4, then use this to change
the formula to be =IF(in_cell_from_sol, in_cell_from_sol, ""). Note that this needs to be input
from D16.
OK, so far we just made our formula longer, but trust me, this concept becomes a life saver.
Doing the same for valid value cells from solution board cells is only a bit trickier. The name
sol_cell_from_val is:
=INDEX(sol_board, INT((ROW(Main!A1)-1)/3)+1, INT((COLUMN(Main!A1)-
1)/3)+1)
This must be created from cell P4. This formula uses ROW and COLUMN together with the
division operator and INT to convert from the coordinates of the current cell in the 27x27 board
to their coordinates in a 9x9 board, then uses INDEX to get the cell out of the sol_board
corresponding to those coordinates.
A neat way of testing this formula is to click into the "Refers to" box of the name manager from
different cells in the valid values board. Depending on what cell you're in you'll see "dancing
ants" (a moving highlight) for a different cell - hopefully the corresponding cell in the solution
board.
8/6/2019 Excel Su Doku
10/18
Now that we have some basics, let's put in an actual puzzle and see about getting the inputs to
propagate to the solution board and the valid value board. Here's the puzzle we'll use:
After entering it, the solution board should look like the input board. To make the valid value
board work, we use this formula for all valid board cells:
=IF(sol_cell_from_val"",IF(sol_cell_from_val=onetonine, onetonine,""),
onetonine)
This means that the current cell is blanked out if a value exists in the solution cell and that
value isn't the current onetonine value.
This should give you:
https://blogs.msdn.com/blogfiles/excel/WindowsLiveWriter/BuildingaBasicUnderstandableSudokuSolver_13F2D/image_14.pnghttps://blogs.msdn.com/blogfiles/excel/WindowsLiveWriter/BuildingaBasicUnderstandableSudokuSolver_13F2D/image_12.png8/6/2019 Excel Su Doku
11/18
Now we're ready to do the stuff that will actually help come up with solutions based on the rulesand strategies of Sudoku.
Checking for a number in the rows of the solution board
The main rule of Sudoku is that you can't have two of the same number in any row, column, or
3x3 big box. We will start by adding the rule that there can't be more than one of a number in
any row and then working in columns and big boxes. For example, in the second big cell in the
first row, none of the numbers 4, 2, 7 or 9 are possible as a result of this rule. We can do this by
turning blank any cells in the valid values board for which 1) a solution for the box doesn't exist
(which is precisely when we get to the final onetonine in the formula for valid value cells) and 2)
the row of the solution board contains the number equal to the current value ofonetonine. Note
that condition #1 is precisely where the last onetonine shows up (i.e. no solution exists for the
current big cell), so all we have to do is put the logic for #2 there. This logic can be expressed
as:
=IF(COUNTIF(sol_row_from_val, onetonine)>0, "", onetonine)
Where sol_row_from_val is:
=INDEX(sol_board, INT((ROW(Main!A1)-1)/3)+1, 0)
Again, this must be entered from P4.
So combining these we get:
=IF(sol_cell_from_val"",IF(sol_cell_from_val=onetonine, onetonine,""),
IF(COUNTIF(sol_row_from_val, onetonine)>0, "",onetonine))
https://blogs.msdn.com/blogfiles/excel/WindowsLiveWriter/BuildingaBasicUnderstandableSudokuSolver_13F2D/image_16.png8/6/2019 Excel Su Doku
12/18
Which, while not simple, is at least understandable and gives you a valid values board that
looks like this:
Extending to columns and (3x3) big boxes
When we go to add the rules for "no two of the same number in a column" and "no two of the
same number in a big box" in this same way, we will run into two problems: 1. you can't create
sol_bigbox_from_val directly using INDEX because INDEX only returns a cell, row, or column
from a range or the whole range and 2. it will start to get unwieldy to have all three of the
COUNTIFs OR'd together at the end of this formula.
To solve the first problem, you can use OFFSET - as you could use OFFSET to create any of the
other references here - but because OFFSET is volatile this will lead to performance problems
down the road. A better solution is to take the union of two references that you get from INDEX
(using the union operator in Excel - the colon) in order to make a 3x3 range. This gives us a
sol_bigbox_from_val with the following formula (entered from P4):
=INDEX(sol_board, INT((ROW(Main!A1)-1)/9)*3+1, INT((COLUMN(Main!A1)-1)/9)*3+1):INDEX(sol_board, INT((ROW(Main!A1)-1)/9)*3+3,
INT((COLUMN(Main!A1)-1)/9)*3+3)
By now we can pick this formula apart more easily. The INT, ROW, division part says that for
every nine rows you move in the valid value board, move down by a block of three rows in the
solution board. There's a similar expression for columns that accomplishes much the same
thing moving across. The second reference is precisely the first reference, but offset two rows
down and two columns across, giving you a 3x3 box.
Now that we have this, we could write one big formula that covers whether the current
onetonine value already exists in any of the row, column or big box, but let's use abstraction
again here to keep the fundamental formula of the valid value board more simple. Instead ofputting it directly into the formula, let's invent a new name called solution_in_rcb for "does
https://blogs.msdn.com/blogfiles/excel/WindowsLiveWriter/BuildingaBasicUnderstandableSudokuSolver_13F2D/image_18.png8/6/2019 Excel Su Doku
13/18
there exist a solution cell with my number in any of the row, column, or bigbox?" This name
only ever has to return true or false (doing the test part of the condition #2 does above) and
despite not being short, is actually really simple to write:
=OR(COUNTIF(sol_row_from_val, onetonine)>0, COUNTIF(sol_col_from_val,
onetonine)>0, COUNTIF(sol_bigbox_from_val, onetonine)>0)
Taking advantage of this new name makes our new formula for valid value cells:
=IF(sol_cell_from_val"",IF(sol_cell_from_val=onetonine, onetonine,""),
IF(solution_in_rcb, "",onetonine))
Which is not only shorter than this formula had been and much more understandable, it also
results in some clear places where there's only one possible solution:
So we can eyeball some solutions, but the trick now is to feed those into the solution board.
This is where iteration comes in. Next time we'll use iteration and a few more formula tricks to
solve some Sudokus.
Edit: Updated the sol_bigbox_from_val formula to reflect what it looks like when entered from
the starting cell in P4. Also clarified in a couple other places that the starting cell should be P4.
Attachment: Names Based Sudoku Solver.zip 15 Comments
Formulas and functions, How To
value:%3CA%20
http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Components-PostAttachments/00-08-96-98-90/Names-Based-Sudoku-Solver.ziphttp://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Components-PostAttachments/00-08-96-98-90/Names-Based-Sudoku-Solver.ziphttp://blogs.msdn.com/b/excel/archive/tags/Formulas+and+functions/http://blogs.msdn.com/b/excel/archive/tags/How+To/https://blogs.msdn.com/blogfiles/excel/WindowsLiveWriter/BuildingaBasicUnderstandableSudokuSolver_13F2D/image_20.pnghttp://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Components-PostAttachments/00-08-96-98-90/Names-Based-Sudoku-Solver.ziphttp://blogs.msdn.com/b/excel/archive/tags/Formulas+and+functions/http://blogs.msdn.com/b/excel/archive/tags/How+To/8/6/2019 Excel Su Doku
14/18
true:undefined
Comments
Building a Basic, Understandable Sudoku Solver Using Excel IterativeCalculation - Part 1/2 : EasyCoded
30 Sep 2008 2:22 AM
http://blogs.msdn.com/b/excel/rsscomments.aspxhttp://blogs.msdn.com/b/excel/rsscomments.aspxhttp://www.easycoded.com/building-a-basic-understandable-sudoku-solver-using-excel-iterative-calculation-part-12/http://www.easycoded.com/building-a-basic-understandable-sudoku-solver-using-excel-iterative-calculation-part-12/http://www.google.com/bookmarks/mark?op=add&bkmk=http://blogs.msdn.com/b/excel/archive/2008/09/29/building-a-basic-understandable-sudoku-solver-using-excel-iterative-calculation-part-1-2.aspx&title=Building%20a%20Basic,%20Understandable%20Sudoku%20Solver%20Using%20Excel%20Iterative%20Calculation%20-%20Part%201/2%20-%20Microsoft%20Excel%202010%20-%20Site%20Home%20-%20MSDN%20Blogshttp://www.stumbleupon.com/submit?url=http://blogs.msdn.com/b/excel/archive/2008/09/29/building-a-basic-understandable-sudoku-solver-using-excel-iterative-calculation-part-1-2.aspx&title=Building%20a%20Basic,%20Understandable%20Sudoku%20Solver%20Using%20Excel%20Iterative%20Calculation%20-%20Part%201/2%20-%20Microsoft%20Excel%202010%20-%20Site%20Home%20-%20MSDN%20Blogshttp://www.newsvine.com/_tools/seed&save?u=http://blogs.msdn.com/b/excel/archive/2008/09/29/building-a-basic-understandable-sudoku-solver-using-excel-iterative-calculation-part-1-2.aspx&h=Building%20a%20Basic,%20Understandable%20Sudoku%20Solver%20Using%20Excel%20Iterative%20Calculation%20-%20Part%201/2%20-%20Microsoft%20Excel%202010%20-%20Site%20Home%20-%20MSDN%20Blogs&s=http://www.mixx.com/submit?page_url=http://blogs.msdn.com/b/excel/archive/2008/09/29/building-a-basic-understandable-sudoku-solver-using-excel-iterative-calculation-part-1-2.aspxhttp://favorites.live.com/quickadd.aspx?url=http://blogs.msdn.com/b/excel/archive/2008/09/29/building-a-basic-understandable-sudoku-solver-using-excel-iterative-calculation-part-1-2.aspx&title=Building%20a%20Basic,%20Understandable%20Sudoku%20Solver%20Using%20Excel%20Iterative%20Calculation%20-%20Part%201/2%20-%20Microsoft%20Excel%202010%20-%20Site%20Home%20-%20MSDN%20Blogshttp://friendfeed.com/?url=http://blogs.msdn.com/b/excel/archive/2008/09/29/building-a-basic-understandable-sudoku-solver-using-excel-iterative-calculation-part-1-2.aspx&title=Building%20a%20Basic,%20Understandable%20Sudoku%20Solver%20Using%20Excel%20Iterative%20Calculation%20-%20Part%201/2%20-%20Microsoft%20Excel%202010%20-%20Site%20Home%20-%20MSDN%20Blogshttp://technorati.com/faves/?add=http://blogs.msdn.com/b/excel/archive/2008/09/29/building-a-basic-understandable-sudoku-solver-using-excel-iterative-calculation-part-1-2.aspxhttp://faves.com/Authoring.aspx?u=http://blogs.msdn.com/b/excel/archive/2008/09/29/building-a-basic-understandable-sudoku-solver-using-excel-iterative-calculation-part-1-2.aspx&t=Building%20a%20Basic,%20Understandable%20Sudoku%20Solver%20Using%20Excel%20Iterative%20Calculation%20-%20Part%201/2%20-%20Microsoft%20Excel%202010%20-%20Site%20Home%20-%20MSDN%20Blogshttp://www.fark.com/cgi/farkit.pl?u=http://blogs.msdn.com/b/excel/archive/2008/09/29/building-a-basic-understandable-sudoku-solver-using-excel-iterative-calculation-part-1-2.aspx&h=Building%20a%20Basic,%20Understandable%20Sudoku%20Solver%20Using%20Excel%20Iterative%20Calculation%20-%20Part%201/2%20-%20Microsoft%20Excel%202010%20-%20Site%20Home%20-%20MSDN%20Blogshttp://www.diigo.com/post?url=http://blogs.msdn.com/b/excel/archive/2008/09/29/building-a-basic-understandable-sudoku-solver-using-excel-iterative-calculation-part-1-2.aspx&title=Building%20a%20Basic,%20Understandable%20Sudoku%20Solver%20Using%20Excel%20Iterative%20Calculation%20-%20Part%201/2%20-%20Microsoft%20Excel%202010%20-%20Site%20Home%20-%20MSDN%20Blogs&desc=http://blogmarks.net/my/new.php?mini=1&simple=1&url=http://blogs.msdn.com/b/excel/archive/2008/09/29/building-a-basic-understandable-sudoku-solver-using-excel-iterative-calculation-part-1-2.aspx&title=Building%20a%20Basic,%20Understandable%20Sudoku%20Solver%20Using%20Excel%20Iterative%20Calculation%20-%20Part%201/2%20-%20Microsoft%20Excel%202010%20-%20Site%20Home%20-%20MSDN%20Blogs&content=http://spaces.live.com/BlogIt.aspx?Title=Building%20a%20Basic,%20Understandable%20Sudoku%20Solver%20Using%20Excel%20Iterative%20Calculation%20-%20Part%201/2%20-%20Microsoft%20Excel%202010%20-%20Site%20Home%20-%20MSDN%20Blogs&SourceURL=http://blogs.msdn.com/b/excel/archive/2008/09/29/building-a-basic-understandable-sudoku-solver-using-excel-iterative-calculation-part-1-2.aspxhttp://www.myspace.com/Modules/PostTo/Pages/?u=http://blogs.msdn.com/b/excel/archive/2008/09/29/building-a-basic-understandable-sudoku-solver-using-excel-iterative-calculation-part-1-2.aspx&t=Building%20a%20Basic,%20Understandable%20Sudoku%20Solver%20Using%20Excel%20Iterative%20Calculation%20-%20Part%201/2%20-%20Microsoft%20Excel%202010%20-%20Site%20Home%20-%20MSDN%20Blogshttp://slashdot.org/bookmark.pl?url=http://blogs.msdn.com/b/excel/archive/2008/09/29/building-a-basic-understandable-sudoku-solver-using-excel-iterative-calculation-part-1-2.aspx&title=Building%20a%20Basic,%20Understandable%20Sudoku%20Solver%20Using%20Excel%20Iterative%20Calculation%20-%20Part%201/2%20-%20Microsoft%20Excel%202010%20-%20Site%20Home%20-%20MSDN%20Blogshttp://www.reddit.com/submit?url=http://blogs.msdn.com/b/excel/archive/2008/09/29/building-a-basic-understandable-sudoku-solver-using-excel-iterative-calculation-part-1-2.aspx&title=Building%20a%20Basic,%20Understandable%20Sudoku%20Solver%20Using%20Excel%20Iterative%20Calculation%20-%20Part%201/2%20-%20Microsoft%20Excel%202010%20-%20Site%20Home%20-%20MSDN%20Blogshttp://www.linkedin.com/shareArticle?mini=true&ro=true&url=http://blogs.msdn.com/b/excel/archive/2008/09/29/building-a-basic-understandable-sudoku-solver-using-excel-iterative-calculation-part-1-2.aspx&title=Building%20a%20Basic,%20Understandable%20Sudoku%20Solver%20Using%20Excel%20Iterative%20Calculation%20-%20Part%201/2%20-%20Microsoft%20Excel%202010%20-%20Site%20Home%20-%20MSDN%20Blogs&summary=&source=Microsoft&armin=arminhttp://del.icio.us/post?url=http://blogs.msdn.com/b/excel/archive/2008/09/29/building-a-basic-understandable-sudoku-solver-using-excel-iterative-calculation-part-1-2.aspx&title=Building%20a%20Basic,%20Understandable%20Sudoku%20Solver%20Using%20Excel%20Iterative%20Calculation%20-%20Part%201/2%20-%20Microsoft%20Excel%202010%20-%20Site%20Home%20-%20MSDN%20Blogshttp://digg.com/submit?url=http://blogs.msdn.com/b/excel/archive/2008/09/29/building-a-basic-understandable-sudoku-solver-using-excel-iterative-calculation-part-1-2.aspx&title=Building%20a%20Basic,%20Understandable%20Sudoku%20Solver%20Using%20Excel%20Iterative%20Calculation%20-%20Part%201/2%20-%20Microsoft%20Excel%202010%20-%20Site%20Home%20-%20MSDN%20Blogshttp://twitter.com/home?status=Building%20a%20Basic,%20Understandable%20Sudoku%20Solver%20Using%20Excel%20Iterative%20Calculation%20-%20Part%201/2%20-%20Microsoft%20Excel%202010%20-%20Site%20Home%20-%20MSDN%20Blogs%20:%20http://blogs.msdn.com/b/excel/archive/2008/09/29/building-a-basic-understandable-sudoku-solver-using-excel-iterative-calculation-part-1-2.aspxhttp://www.facebook.com/sharer.php?u=http://blogs.msdn.com/b/excel/archive/2008/09/29/building-a-basic-understandable-sudoku-solver-using-excel-iterative-calculation-part-1-2.aspx&t=Building%20a%20Basic,%20Understandable%20Sudoku%20Solver%20Using%20Excel%20Iterative%20Calculation%20-%20Part%201/2%20-%20Microsoft%20Excel%202010%20-%20Site%20Home%20-%20MSDN%20Blogshttp://blogs.msdn.com/b/excel/rsscomments.aspxhttp://www.easycoded.com/building-a-basic-understandable-sudoku-solver-using-excel-iterative-calculation-part-12/http://www.easycoded.com/building-a-basic-understandable-sudoku-solver-using-excel-iterative-calculation-part-12/8/6/2019 Excel Su Doku
15/18
PingBack fromhttp://www.easycoded.com/building-a-basic-understandable-sudoku-
solver-using-excel-iterative-calculation-part-12/
Andrew Wagner30 Sep 2008 8:55 AM
Can you please give the correct formula for sol_col_from_val (used in solution_in_rcb)? Thanks!
Charlie Ellis30 Sep 2008 12:39 PM
Sure thing, Andrew. The correct formula for sol_col_from_val is:
=INDEX(sol_board, 0, INT((COLUMN(Main!A1)-1)/3)+1)
...when entered from the first cell in the valid values board.
Basically, it's the same thing as sol_row_from_val (which was =INDEX(sol_board,
INT((ROW(Main!A1)-1)/3)+1, 0)) but with a zero for the row_num argument as opposed to a zero
for the col_num argument. Note that putting a zero for the row_num or col_num means that
INDEX should return all rows or all columns of the reference instead of a specific one.
Also, for future reference, you can see every formula used in this post (and the upcoming part
two) by downloading a copy of the spreadsheet from the link Joe provided.
Ron30 Sep 2008 1:30 PM
This doesn't work as posted. The sol_bigbox_from_val formula should be
=INDEX(sol_board, INT((ROW(Main!A1)-1)/9)*3+1, INT((COLUMN(Main!A1)-
1)/9)*3+1):INDEX(sol_board, INT((ROW(Main!A1)-1)/9)*3+3, INT((COLUMN(Main!A1)-1)/9)*3+3)
with P4 selected.
Charlie Ellis1 Oct 2008 3:02 AM
Ron - Actually
=INDEX(sol_board, INT((ROW(Main!S19)-1)/9)*3+1, INT((COLUMN(Main!S19)-
1)/9)*3+1):INDEX(sol_board, INT((ROW(Main!S19)-1)/9)*3+3, INT((COLUMN(Main!S19)-
1)/9)*3+3)
is correct, so long as you select cell AH22 when you enter it. ;)
http://www.easycoded.com/building-a-basic-understandable-sudoku-solver-using-excel-iterative-calculation-part-12/http://www.easycoded.com/building-a-basic-understandable-sudoku-solver-using-excel-iterative-calculation-part-12/http://www.easycoded.com/building-a-basic-understandable-sudoku-solver-using-excel-iterative-calculation-part-12/http://www.easycoded.com/building-a-basic-understandable-sudoku-solver-using-excel-iterative-calculation-part-12/http://www.easycoded.com/building-a-basic-understandable-sudoku-solver-using-excel-iterative-calculation-part-12/8/6/2019 Excel Su Doku
16/18
Yes, your fomulation is correct if you're entering that name from the first cell of the valid values
board, as all the other names' formulas work. I'll work with Joe to update the post.
db1 Oct 2008 9:01 AM
I plugged in a sample problem, set iteration to 1000, and it gave an invalid answer.
Charlie Ellis1 Oct 2008 4:27 PM
Can you share the sample? I'd love to try to debug it and see what is going wrong.
BTW, I can't say I'm too surprised if there's a bug in the formulas; while I tested previous
versions of the spreadsheet extensively, I've only tested this version a little bit, since I
(re-)created it from scratch as a part of making this blog post.
Joseph Chirilov2 Oct 2008 2:26 AM
Hi, I updated the post based on Ron's feedback.
Thanks,
Joe
Microsoft Excel2 Oct 2008 2:32 AM
Today's author, Charlie Ellis, continues discussing the spreadsheet he built to solve Sudokupuzzles.
TechieBird2 Oct 2008 5:07 PM
Great post - I've been using Excel since what seems like the dawn of time and I never knew you
could name formulas like that. Now I'm just waiting for the walk-through that teaches me what
to do with array formulas... :o)
http://blogs.msdn.com/members/Joseph-Chirilov/http://blogs.msdn.com/members/Joseph-Chirilov/http://blogs.msdn.com/excel/archive/2008/10/01/building-a-basic-understandable-sudoku-solver-using-excel-iterative-calculation-part-2-2.aspxhttp://bwain-dump.blogspot.com/http://blogs.msdn.com/members/Joseph-Chirilov/http://blogs.msdn.com/members/Joseph-Chirilov/http://blogs.msdn.com/excel/archive/2008/10/01/building-a-basic-understandable-sudoku-solver-using-excel-iterative-calculation-part-2-2.aspxhttp://bwain-dump.blogspot.com/8/6/2019 Excel Su Doku
17/18
Cooking
4 Oct 2008 8:52 AM
Very less explored subject and you have provided valuable information. Thanks for the great
stuff.
Paan20 Oct 2008 2:46 PM
It is really nice, I would be glad if you could attach one file, with sudoku puzzle and the formula
Barry Lynch20 Oct 2008 7:40 PM
Your Sudoku solver looks great, but having the possibility matrix and the entered candidates on
different matrices slows down the solving process.
I did my own Sudoku Solver, using basic formulae, which places both the possibility space and
the entered candidates on the same matrix.
As in your model,once a candidate is entered in a cell, all other candidates disappear from that
cell and the entered candidate disappears from all cells in the same row, column and box.
I find it more user friendly than yours but it is a larger size than your solution matrix as the 9
possible candidates for each cell display in the row above the candidate's cell. This candidate's
cell is larger as it contains 9 merged cells.This allows for a larger font for the entered candidate.
Could you adjust your programme to display solution and possibility space on the same matrix?,
or
is there a way I could adjust my programme so that the one cell initially displays the possibility
space in 9 small sub-cells, and these 9 small sub-cells then merge into the one cell to display
the entered candidate?
Barry Lynch
Joseph Chirilov21 Oct 2008 1:41 PM
Paan, the file is attached at the bottom of the post.
http://blogs.msdn.com/members/Cooking/http://blogs.msdn.com/members/Cooking/http://[email protected]/http://blogs.msdn.com/members/Joseph-Chirilov/http://blogs.msdn.com/members/Joseph-Chirilov/http://blogs.msdn.com/members/Joseph-Chirilov/http://blogs.msdn.com/members/Cooking/http://blogs.msdn.com/members/Cooking/http://[email protected]/http://blogs.msdn.com/members/Joseph-Chirilov/8/6/2019 Excel Su Doku
18/18
Shahed Khan (MVP C#)
28 Oct 2008 4:48 AM
196 Microsoft Team blogs searched, 85 blogs have new articles in the past 7 days. 194 new
articles found...
Page 1 of 1 (15 items)
2010 Microsoft Corporation. All rights reserved.
Terms of Use
Trademarks
Privacy Statement
Report Abuse
Bottom of Form
http://msbdusers.net/blogs/shahedkhan/archive/2008/10/28/7759.aspxhttp://msdn.microsoft.com/en-us/cc300389.aspxhttp://www.microsoft.com/library/toolbar/3.0/trademarks/en-us.mspxhttp://www.microsoft.com/info/privacy.mspxhttp://tmp/svn3l.tmp/javascript:WebForm_DoPostBackWithOptions(new%20WebForm_PostBackOptions(%22ctl00$fragment_2bc0d047_f05c_48a0_823b_e99b6fbc3f49$ctl01$ctl00$ctl01$lnkAbuse%22,%20%22%22,%20true,%20%22%22,%20%22%22,%20false,%20true))http://msbdusers.net/blogs/shahedkhan/archive/2008/10/28/7759.aspxhttp://msdn.microsoft.com/en-us/cc300389.aspxhttp://www.microsoft.com/library/toolbar/3.0/trademarks/en-us.mspxhttp://www.microsoft.com/info/privacy.mspxhttp://tmp/svn3l.tmp/javascript:WebForm_DoPostBackWithOptions(new%20WebForm_PostBackOptions(%22ctl00$fragment_2bc0d047_f05c_48a0_823b_e99b6fbc3f49$ctl01$ctl00$ctl01$lnkAbuse%22,%20%22%22,%20true,%20%22%22,%20%22%22,%20false,%20true))