|
参与一下。。。- Sub ykcbf() '//2024.2.14
- Set d = CreateObject("Scripting.Dictionary")
- r = Me.Cells(Rows.Count, "j").End(3).Row
- zrr = Me.Range("j1:l" & r)
- Me.[h2:h1000] = ""
- r = Me.Cells(Rows.Count, 1).End(3).Row
- arr = Me.Range("a1:h" & r)
- For i = 2 To UBound(zrr)
- For j = 1 To UBound(arr, 2)
- If arr(1, j) = zrr(i, 1) Then zrr(i, 3) = j
- Next
- Next
- On Error Resume Next
- For i = 2 To UBound(arr)
- s = arr(i, 2)
- If Not d.exists(s) Then
- For x = 2 To UBound(zrr)
- If arr(i, zrr(x, 3)) = zrr(x, 2) Then
- d(s) = "否决-" & zrr(x, 2)
- End If
- Next
- End If
- If arr(i, zrr(x, 3)) = zrr(x, 2) Then
- arr(i, 8) = d(s)
- End If
- Next
- Me.Range("a1:h" & r) = arr
- MsgBox "OK!"
- End Sub
复制代码
|
|