产品计划用
发布日期:2021-05-26 00:32:17 浏览次数:23 分类:精选文章

本文共 1961 字,大约阅读时间需要 6 分钟。

Private Sub CommandButton1_Click()

    Call sum(54)

    Call sum(61)

    Call sum(68)

    Call sum(77)

    Call sum(86)

    Call sum(92)

'MsgBox "end"

End Sub

Sub sum(intBeineLine_param As Integer)

    'MsgBox "sum begin"

    Dim coutnBeginColumn As Integer '8 ソェハシホサヨテ

    Dim countKind1 As Double '078A

    Dim countKind2 As Double '083A

    '------------------------------------------------078A----------------------------------------------------

    countKind1 = 0

    strCompareKind1 = Worksheets("ノ峵bモ興ュ").Cells(intBeineLine_param + 1, 52).Value

    'MsgBox strCompareKind1

    coutnBeginColumn = 8

    Do While coutnBeginColumn < 51

       If Worksheets("ノ峵bモ興ュ").Cells(intBeineLine_param, coutnBeginColumn).Value = strCompareKind1 Then

           countKind1 = countKind1 + Worksheets("ノ峵bモ興ュ").Cells(intBeineLine_param + 1, coutnBeginColumn).Value

       End If

           coutnBeginColumn = coutnBeginColumn + 1

    '------------------------------------------------083A----------------------------------------------------

    countKind2 = 0

    strCompareKind2 = Worksheets("ノ峵bモ興ュ").Cells(intBeineLine_param + 2, 52).Value

    'MsgBox strCompareKind2

    coutnBeginColumn = 8

    Do While coutnBeginColumn < 51

       If Worksheets("ノ峵bモ興ュ").Cells(intBeineLine_param, coutnBeginColumn).Value = strCompareKind2 Then

           countKind2 = countKind2 + Worksheets("ノ峵bモ興ュ").Cells(intBeineLine_param + 1, coutnBeginColumn).Value

       End If

           coutnBeginColumn = coutnBeginColumn + 1

    Worksheets("ノ峵bモ興ュ").Cells(intBeineLine_param + 1, 53).Value = countKind1

    Worksheets("ノ峵bモ興ュ").Cells(intBeineLine_param + 2, 53).Value = countKind2

End Sub

上一篇:关于结合测试时,数据准备的一些注意点 (之开始篇:如何能更快,更好的准备测试数据)。
下一篇:当有脚本错误时,停止运行。

发表评论

最新留言

表示我来过!
[***.240.166.169]2025年05月03日 01时32分06秒