For elementary School mathematics children, learn the "99 multiplication table" mantra, is equal to open into the multiplication of the Temple gate. As a parent of you and Excel is more proficient, you can do it yourself to do for them, here we take Excel 2007 as an example to illustrate.
After running Excel 2007, click to switch to the macro option, click "View Macros" in the "Macros" option group to open the Macro dialog box, under "Macro name" Enter a name (such as "multiplication table"), click the "Create" button into the VBA edit state (Figure 1).
Figure 1 Excel Macro Settings
Then clear the code in the right pane and enter the following code:
Sub 九九表()
Dim i As Byte, j As Byte, msg As String
For i = 1 To 9 ‘定义相乘的一个数字变量
msg = msg & Chr(10)
For j = 1 To I ‘定义另一个数字变量
msg = msg & WorksheetFunction.Text(j, "[DBNum1][$-804]0") & WorksheetFunction.Text(i, "[DBNum1][$-804]0") & VBA.IIf(i * j > 9, "", "得") _
& WorksheetFunction.Text(i * j, "[DBNum1][$-804]0") &
‘完成两个数字相乘运行,如相乘的结果小于10的话则在中间加“地”字
Space(3)
Next
Next
MsgBox msg, 64, "九九表" ‘显示在窗口右上角的标题
End Sub
Then press the ALT+Q key combination to close and return to Excel, OK, press the ALT+F8 key combination again open the Macro dialog box, click the "Run" button to see if we are familiar with the "99 multiplication table"? (Figure 2)
Figure 2 The 99 multiplication table in Excel