老师,可否解析:For I = 10 To [B65536].End(3).Row + 2 '结存
If InStr(Cells(I, 5).Value, "月合计") Then
Cells(I, "L") = Cells(I, "F") - Cells(I, "I") + Cells(I - 1, "L").End(3)
Cells(I, "N") = Cells(I, "H") - Cells(I, "K") + Cells(I - 1, "N").End(3)
If Cells(I, "L") = 0 Then
Cells(I, "M") = 0
Else
Cells(I, "M") = Cells(I, "N") / Cells(I, "L")
End If
ElseIf Cells(I, 4) = "累 计" Then
Cells(I, "L") = Cells(I - 1, "L")
Cells(I, "M") = Cells(I - 1, "M")
Cells(I, "N") = Cells(I - 1, "N")
End If
Next
这段代码的意思?“ElseIf Cells(I, 4)”为啥不是“ElseIf Cells(I, 5)”呢?前面是“5”列,后面咋变成了“4”列呢? |