Kindergarten Math
My wife and I split duties when it comes to teaching our kindergarten-age son. She teaches him reading and writing and I teach him math. To that end, I created a table to help him memorize adding and multiplying zero through nine. It's nothing fancy, but you can have it if you like.
Download MathGames.zip
I started with a grid and some formatting. I use Row 1 and Column A to hold random numbers so I can sort Row 2 and Column B. The data entry grid is conditionally formatted to show green for correct answers and red for incorrect.

The formula for the first one is
=IF($H$13=1,AND(NOT(ISBLANK(C3)),C3=C$2+$B3),AND(NOT(ISBLANK(C3)),C3=C$2*$B3))
The second formula is the same except for it's 'not equal' instead of 'equal'.

The Start Over button just resets everything with a simple macro:
Dim rTop As Range
Dim rSide As Range
Dim rData As Range
Set rTop = Sheet1.Range("TopRow")
Set rSide = Sheet1.Range("SideCol")
Set rData = Sheet1.Range("Data")
rData.Parent.Unprotect
rData.ClearContents
rTop.Sort rTop.Cells(1), , , , , , , xlNo, , , xlSortRows
rSide.Sort rSide.Cells(1), , , , , , , xlNo, , , xlSortColumns
rData.Parent.Protect
rData(1).Select
End Sub
I need to put some fancy animation in for when all the cells are green. So that there's a prize for completing it.
simon:
how can i see the code to the controls? I checked the VBE and there's no code for the controls...
sorry if i sound like a n00b
9 May 2005, 7:31 amDick Kusleika:
Simon: The controls are from the Forms toolbar. If you right click on the buttona and choose Assign Macro, you'll see the macro that's run when you click it. There is no code for the option buttons. They are linked to cell H13, which is used in the conditional formatting formula. Right click on one of them and choose Format Control to see this.
9 May 2005, 8:13 amsimon:
thanks a lot! i see it now... didn't realize you could manipulate Controls without VB code.
9 May 2005, 8:45 amDA:
DK:
Either I need to return to Kindergarten (do not comment) or the Evalution Version tab should not read "Multiplication"--because I started out with many red cells.
DA
9 May 2005, 10:10 amGraham L:
Just curious what "mulitplcation" is? Sounds like some kind of hockey hairdo process.
9 May 2005, 11:32 amJ-Walk:
Hey, I got 'em all right! Is there a prize or something?
9 May 2005, 12:35 pmDick Kusleika:
"Just curious what “mulitplcation” is?"
Weren't you listening? My wife is in charge of the literary stuff.
9 May 2005, 2:38 pmDick Kusleika:
"Is there a prize..."
You can bring your favorite Pokeman card to show and tell.
9 May 2005, 2:38 pmZ:
This appears to be yet another ingenious DK invention so that he can sit and soak up useless information on TV (and a few gin & tonics) whilst his protege soaks up knowledge
10 May 2005, 3:26 pmDick Kusleika:
Well, I got all my knowlegde from watching the Simpsons. I'm hoping for better for the next generation.
11 May 2005, 8:35 amAnn Veerman:
Thanks, this is cool. My child is 8 and he still will have fun with this. Anything on the computer is more fun than having to pick up an old fashioned pencil! It might also be a great way for me to improve my skills. I want to add a subtraction and divide function. I am a beginner though and don’t understand the language yet. What do the following anachronisms mean? Alternatively where can I find a good reference list of anachronisms?
23 June 2005, 10:51 amVBE
n00b
VB
Doug Glancy:
Ann,
I think you meant "malaprop." Just kidding.
Anyways:
23 June 2005, 2:14 pmVB is Visual Basic - a standalone programming language which can create .exe files.
VBA (even though you didn't ask) is Visual Basic for Applications which has much the same syntax as VB but must be run "inside" Excel, Word, or another program, and is the language used in the above example. It cannot be used to create .exe files - it can only run inside ... oops, already said that.
VBE is the Visual Basic Editor, the interface wherein VBA code is written. To get to it press Alt-F11 while in Excel.