首页->【软件工具包使用(SW/Software Tools Usage)】

6 1

Function sub_func_sheet5Fill()
Sheet5.Activate

posStart = 8
posEnd = 32

With Sheet5
.Range("D8:D32", "F8:F32").Select
.Range("H8:H32", "J8:J32").Select
.Range("L8:L32", "N8:N32").Select
.Range("P8:P32", "R8:R32").Select
.Range("T8:T32", "V8:V32").Select
.Range("W8:W32").Select
.Range("C33:W33").Select
'sum and multi
For k = posStart To posEnd
    s = 0 'sum
    For t = 0 To 18 Step 2
            s = s + .Cells(k, 4 + t).Value
    Next t
            .Cells(k, 23).Value = s
Next k
'total
t = 0
For k = posStart To posEnd
        t = t + .Cells(k, 23).Value
Next k
.Range("C33:W33").Value = t
'prepare for Sheet6
End With

End Function

楼主可见

  1. shwnyoo 1#

    ***此内容已隐藏,只有楼主可见***