Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default Creating a list of values

I am just getting back into programming and would like to create a program
to solve Su Doku puzzles as a refresher. I have created a table on top for
the user to input the values and another below that for the solution. In
the solution table, I will have it check to see if there is a value in the
corresponding cell in the input table via an IF THEN ELSE formula.

If there is a value, it will simply be copied down. If there isn't, I would
like to check to see which numbers (1-9) are in that row, in that column,
and within the 3x3 block (1-3, 1-3) and eliminate those as possible values
for that cel, but can I create a LIST of values? For example, lets say that
1, 4, 5, 7, and 9 are already present in the row, column, or block. That
means that cell 1,1 cannot be those values, but it could be 2, 3, 6, or 8.
I would then continue populating each cel with possible choices until I got
to cel 9,9.

Any suggestions would be greatly appreciated! Thanks in advance.

--
Jeff C



  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 698
Default Creating a list of values

Hi Jeff,

I built my solver using FIND--REPLACE code and named ranges.

I put the given numbers (clues) on the board and then I have a routine
"Enter Numbers" that puts 1 thru 9 in each open square in the puzzle.

Then I use my "Sift Numbers" button by selecting a given number (clue) and
click the sift button. The routine finds any of that number in the 3 x 3
box and the horizontal line and the vertical column and eliminates them all.
Select the next given number and do the same etc... in all nine 3 x 3's.

Or I can use my "Auto Sift" routine and it runs from upper left to bottom
right doing the same thing. Some times on a fairly easy puzzle it will just
solve the whole puzzle if run a couple--three time. Takes the fun out of
the puzzle solving but I was honing program skill not Sudoku skills.

On the Evil level puzzles it will not do the upper level logical deductions
that are needed and I have to press gray matter into play.

I can send you a copy if you wish. Of course it's armature level code, NOT
Chip P, Tom O, John W stuff but I did get a nice piece of advice from Norman
Jones on straightening out some troublesome code.

Regards,
Howard

"JC Home" wrote in message
...
I am just getting back into programming and would like to create a program
to solve Su Doku puzzles as a refresher. I have created a table on top for
the user to input the values and another below that for the solution. In
the solution table, I will have it check to see if there is a value in the
corresponding cell in the input table via an IF THEN ELSE formula.

If there is a value, it will simply be copied down. If there isn't, I
would like to check to see which numbers (1-9) are in that row, in that
column, and within the 3x3 block (1-3, 1-3) and eliminate those as
possible values for that cel, but can I create a LIST of values? For
example, lets say that 1, 4, 5, 7, and 9 are already present in the row,
column, or block. That means that cell 1,1 cannot be those values, but it
could be 2, 3, 6, or 8. I would then continue populating each cel with
possible choices until I got to cel 9,9.

Any suggestions would be greatly appreciated! Thanks in advance.

--
Jeff C





Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Drop down list selections creating values in adjoining cell WoodyAccess Excel Worksheet Functions 1 November 18th 08 07:03 PM
Creating a list of cell values Link New Users to Excel 3 February 14th 08 09:32 AM
Creating A Unique List of Values From A Table carl Excel Worksheet Functions 8 May 17th 07 11:39 AM
Creating a horizontal list of text values Kelly Excel Discussion (Misc queries) 1 January 9th 07 05:00 PM
Creating a Detailed List from a Summary List [email protected] Excel Worksheet Functions 0 September 7th 06 12:36 AM


All times are GMT +1. The time now is 04:22 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"