美文网首页
Excel技巧之乘法口诀

Excel技巧之乘法口诀

作者: 蔡龙生 | 来源:发表于2020-07-22 09:39 被阅读0次

    初学excel的vba,学习了for循环和if的条件,利用这两个写了个乘法口诀,分享给大家使用。

    Sub cf()
    Dim i, j As Integer
    For i = 1 To 9
        For j = 1 To 9
            If j <= i Then
            Cells(i, j) = j & "×" & i & "=" & i * j
            End If
        Next
    Next
    End Sub
    

    效果如下


    乘法口诀

    也可以把 i*j 替换成"_____",这样就变成了填空题。

    相关文章

      网友评论

          本文标题:Excel技巧之乘法口诀

          本文链接:https://www.haomeiwen.com/subject/jffzkktx.html