vba中row = Cells(Rows().Count(), 2).End(3).row是什么意思 5
上面这段话是什么意思附上整段Sub数量回写()Application.ScreenUpdating=FalseRange("U3:DA60000").ClearConte...
上面这段话是什么意思附上整段
Sub 数量回写()
Application.ScreenUpdating = False
Range("U3:DA60000").ClearContents
Range("U3:DA60000").ClearFormats
Range("L3:L60000").ClearFormats
Dim vArr
Dim i%, j%
Dim row%, countArr%
vArr = Sheet2.UsedRange
row = Cells(Rows().Count(), 2).End(3).row
countArr = UBound(vArr)
For i = 3 To row
For j = 3 To countArr
If Cells(i, 2) = vArr(j, 2) Then
For k = 16 To Sheet2.Cells(1, Columns().Count()).End(1).Column
If vArr(j, k) <> "" Then
vArr(j, k) = Sheet2.Cells(j, "N")
Cells(i, k + 5) = Cells(i, k + 5) + vArr(j, k)
If Cells(i, k + 5) > Cells(i, "L") Then
Cells(i, k + 5).Interior.ColorIndex = 3
Cells(i, "L").Interior.ColorIndex = 3
End If
End If
Next k
End If
Next j
Next i
Application.ScreenUpdating = True
End Sub 展开
Sub 数量回写()
Application.ScreenUpdating = False
Range("U3:DA60000").ClearContents
Range("U3:DA60000").ClearFormats
Range("L3:L60000").ClearFormats
Dim vArr
Dim i%, j%
Dim row%, countArr%
vArr = Sheet2.UsedRange
row = Cells(Rows().Count(), 2).End(3).row
countArr = UBound(vArr)
For i = 3 To row
For j = 3 To countArr
If Cells(i, 2) = vArr(j, 2) Then
For k = 16 To Sheet2.Cells(1, Columns().Count()).End(1).Column
If vArr(j, k) <> "" Then
vArr(j, k) = Sheet2.Cells(j, "N")
Cells(i, k + 5) = Cells(i, k + 5) + vArr(j, k)
If Cells(i, k + 5) > Cells(i, "L") Then
Cells(i, k + 5).Interior.ColorIndex = 3
Cells(i, "L").Interior.ColorIndex = 3
End If
End If
Next k
End If
Next j
Next i
Application.ScreenUpdating = True
End Sub 展开
2个回答
展开全部
这句话的意思是 取活动单元表的第二列最后一个有值的行的行号,并赋值给变量“row”。
本回答被网友采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询