I have always been able to record a procedure.
But this time, no matter how many times I have tried,
it seems the procedure cannot be recorded.
There is this simple logic puzzle, involving the
alphabets, that i design in excel for my kids.
The problem is that sometimes it has multiple
solutions. I want it to have only ONE solution.
The puzzle is a 10 x 10 square, and they solve
the puzzle by making sure that each column and
each row has no more than one instance of the
letters, say, A, B, C, D, E, F, G, H, I, and J.
I want to create a procedure that can test-solve
the puzzle using logic, in a one-solution way.
Instructions for Procedure:
-----------------------------------------------------------
Removing Letters from Some Cells to Create the
Puzzle
-------------------------------------------------
1. First, in the Range("A2:J31"), delete the contents
of the cells whose interior color is white.
2. Using Logic to Fill the Empty Cells with Letters to
Solve the Puzzle.
---------------------------------------------------
In keeping with remaining letters in their
respective cells, use logic to fill in the empty
cells such that each column and each row has no
more than one instance of the letters A, B, C, D,
E, F, G, H, I, and J.
3. Display a message if a puzzle is not solvable or
solvable but does not have one solution.
4. Display no message if a puzzle is solvable and
does have only ONE solution.
Below are the columns and rows and the cell names
of I am using for the puzzle, starting with the
first row and the first column and so on:
-----------------------------------------------------------
A2:A4|B2:B4|C2:C4|D2:D4|E2:E4|F2:F4|G2:G4|H2:H4|I2:I4|J2:J4
-----------------------------------------------------------
A5:A7|B5:B7|C5:C7|D5:D7|E5:E7|F5:F7|G5:G7|H5:H7|I5:I7|J5:J7
-----------------------------------------------------------
A8:A10|B8:B10|C8:C10|D8:D10|E8:E10|F8:F10|G8:G10|H8:H10|I8:I10|J8:J10
---------------------------------------------------------------------
A11:A13|B11:B13|C11:C13|D11:D13|E11:E13|F11:F13|G11:G13|H11:H13|I11:I13|J11:J13
-------------------------------------------------------------------------------
A14:A16|B14:B16|C14:C16|D14:D16|E14:E16|F14:F16|G14:G16|H14:H16|I14:I16|J14:J16
-------------------------------------------------------------------------------
A17:A19|B17:B19|C17:C19|D17:D19|E17:E19|F17:F19|G17:G19|H17:H19|I17:I19|J17:J19
-------------------------------------------------------------------------------
A20:A22|B20:B22|C20:C22|D20:D22|E20:E22|F20:F22|G20:G22|H20:H22|I20:I22|J20:J22
-------------------------------------------------------------------------------
A23:A25|B23:B25|C23:C25|D23:D25|E23:E25|F23:F25|G23:G25|H23:H25|I23:I25|J23:J25
-------------------------------------------------------------------------------
A26:A28|B26:B28|C26:C28|D26:D28|E26:E28|F26:F28|G26:G28|H26:H28|I26:I28|J26:J28
-------------------------------------------------------------------------------
A29:A31|B29:B31|C29:C31|D29:D31|E29:E31|F29:F31|G29:G31|H29:H31|I29:I31|J29:J31
-------------------------------------------------------------------------------