|
参与一下。。。
- Sub ykcbf() '//2024.9.20
- Application.ScreenUpdating = False
- Set d = CreateObject("Scripting.Dictionary")
- arr = Sheets("js").UsedRange
- For i = 2 To UBound(arr)
- For j = 2 To UBound(arr, 2)
- If arr(i, j) <> Empty Then
- s = arr(i, 1) & "|" & arr(1, j)
- d(s) = arr(i, j)
- End If
- Next
- Next
- With Sheets("Sheet1")
- arr = .UsedRange
- For i = 2 To UBound(arr)
- For j = 22 To UBound(arr, 2)
- s = arr(i, 3) & "|" & arr(1, j)
- If d.exists(s) Then
- arr(i, j) = d(s)
- Else
- arr(i, j) = ""
- End If
- Next
- Next
- .UsedRange = arr
- End With
- Set d = Nothing
- Application.ScreenUpdating = True
- MsgBox "OK!"
- End Sub
复制代码
|
评分
-
4
查看全部评分
-
|