<p>新建模块儿,然后输入以下代码</p><p>Sub nine9()<br/>Dim i As Byte, j As Byte, s As Byte<br/>For i = 1 To 9<br/> For j = i To 9<br/> s = j * i<br/> Cells(j, i) = i & "*" & j & "=" & s<br/> Next j<br/>Next i<br/>End Sub</p><p>适合初学者学习~~~</p>
Sub yy()
Dim a As Integer
Dim b As Integer
For a = 1 To 9
For b = 1 To 9
If b > a Then
Sheet1.Cells(a, b) = ""
Else
Sheet2.Cells(a, b) = a & "x" & b & "=" & a * b
End If
Next
Next
End Sub