Do you like to spend your free time writing and editing crossword puzzles? Who doesn’t. Well, hopefully this crossword template will make it easier.
It starts with this blank puzzle.
You enter a space to indicate a black cell and the opposite cell also becomes black.
When you’re done entering spaces, you get a perfectly symmetrical puzzle with all the numbers in the right places.
Let’s see how it’s done. The puzzle starts in C3. Cell C3 has a ‘1’ in it. C4:C17 have this formula
It figures out the largest number in the above row and adds one. D3:Q17 have this formula
=IF(OR(C3=” “,D2=” “),MAX(MAX($C$3:C3),MAX($C$2:Q2))+1,”")
If the space above or the left has a space, it figures the largest number above and to the left and adds one. In order for that one to work properly, C2:Q2 and B3:B17 contain spaces.
All of the cells in the grid have this conditional formatting.
Finally, a Worksheet_Change event restores deleted cells and blacks out symmetrical cells.
Private Sub Worksheet_Change(ByVal Target As Range)
Dim sFormula As String
Dim lRow As Long, lCol As Long
Dim rCell As Range
Application.EnableEvents = False
For Each rCell In Target.Cells
'if the cell is deleted, put the formula back in the cell
If IsEmpty(rCell.Value) Then
If rCell.Column > 3 And rCell.Column < 18 Then
rCell.FormulaR1C1 = "=IF(OR(RC[-1]="" "",R[-1]C="" ""),MAX(MAX(R3C3:RC[-1]),MAX(R2C3:R[-1]C))+1,"""")"
ElseIf rCell.Column = 3 And rCell.Row > 3 Then
rCell.FormulaR1C1 = "=MAX(R[-1]C:R[-1]C)+1?"
ElseIf rCell.Address = "$C$3" Then
rCell.Value = 1
'If a cell is blacked out, find its symmetrical brother and enter a space
If rCell.Value = Space(1) Then
lRow = -(rCell.Row - Me.Range("rngMiddle").Row)
lCol = -(rCell.Column - Me.Range("rngMiddle").Column)
Me.Range("rngMiddle").Offset(lRow, lCol).Value = Space(1)
Application.EnableEvents = True
I named the cell in the middle of the puzzle ‘rngMiddle’ so I could get the proper offsets.
A while back, I saw an episode of Independent Lens called Wordplay. It showed how crossword writers write, and it’s nothing like this template works. They fill in the letters first, then black out where they need to. Putting superscript numbers and regular letters in the grid was too hard for a Monday night, so it will have to wait for version 2.
You can download crossword.zip