请老师帮注解下面语句,是用来取值的,刚学,只看到结果不知具体的过程。谢谢! Sub cc() Dim arr1, arr2, arr3, i%, x%, m% With Sheets("班务时长") arr1 = .Range("a2:b" & .[a65536].End(xlUp).Row) End With With Sheets("员工列表") arr2 = .Range("a2:d" & .[a65536].End(xlUp).Row) End With ReDim arr3(1 To UBound(arr2), 1 To 3) For i = 1 To UBound(arr1) If arr1(i, 2) <> "休" Then For x = 1 To UBound(arr2) If arr2(x, 1) = arr1(i, 1) Then k = k + 1 For m = 1 To 3 arr3(k, m) = arr2(x, m + 1) Next End If Next End If Next [a3].Resize(UBound(arr3), 3) = arr3 End Sub |