# 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.

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:

Sub Reset()

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.

Posted in Uncategorized

## 12 thoughts on “Kindergarten Math”

1. simon says:

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

2. 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.

3. simon says:

thanks a lot! i see it now… didn’t realize you could manipulate Controls without VB code.

4. DA says:

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

5. Graham L says:

Just curious what “mulitplcation” is? Sounds like some kind of hockey hairdo process.

6. Hey, I got ’em all right! Is there a prize or something?

7. “Just curious what ìmulitplcationî is?”

Weren’t you listening? My wife is in charge of the literary stuff. :)

8. “Is there a prize…”

You can bring your favorite Pokeman card to show and tell.

9. Z says:

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. Well, I got all my knowlegde from watching the Simpsons. I’m hoping for better for the next generation.

11. 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?
VBE
n00b
VB

12. Doug Glancy says:

Ann,

I think you meant “malaprop.” Just kidding.

Anyways:
VB 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.

Posting code? Use <pre> tags for VBA and <code> tags for inline.