|
楼主 |
发表于 2016-2-19 21:07
|
显示全部楼层
[广告] VBA代码宝 - VBA编程加强工具 · VBA代码随查随用 · 内置多项VBA编程加强工具 ★ 免费下载 ★ ★ 使用手册★
d(1).RemoveAll
Myr = Cells(Rows.Count, 2).End(xlUp).Row
Brr = Range("b6:f" & Myr):
Range("b6:f" & Myr).Borders.LineStyle = xlContinuous
For i = 1 To UBound(Brr)
If Brr(i, 1) <> "" Then d(2)(Brr(i, 1)) = i
Next
Arr = Sheet3.[a1].CurrentRegion
For i = 2 To UBound(Arr)
If Arr(i, 1) = zkz Then d(1)(Arr(i, 1)) = d(1)(Arr(i, 1)) & i & ","
Next
k = d(1).keys: t = d(1).items
For i = 0 To UBound(k)
t(i) = Left(t(i), Len(t(i)) - 1)
If InStr(t(i), ",") Then
aa = Split(t(i), ",")
For j = 0 To UBound(aa)
If d(2).exists(Arr(aa(j), 3)) Then
n = d(2)(Arr(aa(j), 3)) + 5
Cells(n, 4) = Arr(aa(j), 7): Cells(n, 5) = Arr(aa(j), 10)
End If
Next
End If
Next
If d(2).exists(Arr(aa(j), 3))
根据 Arr(aa(j), 10) 的值 返回最大值 不知道怎么写 |
|