|
[广告] Excel易用宝 - 提升Excel的操作效率 · Excel / WPS表格插件 ★ 免费下载 ★ ★ 使用帮助★
Sub Fish()
Dim Dic As Object
Dim aa, bb
Dim i&, j&
Set Dic = CreateObject("Scripting.Dictionary")
aa = Sheets("A").[a1].CurrentRegion
For i = 2 To UBound(aa)
Dic(aa(i, 2) & aa(i, 3)) = i
Next
For i = 8 To UBound(aa, 2)
Dic(aa(1, i)) = i
Next
bb = Sheets("B").[a1].CurrentRegion
For i = 2 To UBound(bb)
For j = 8 To UBound(bb, 2)
bb(i, j) = aa(Dic(bb(i, 2) & bb(i, 3)), Dic(bb(1, j)))
Next
Next
Sheets("B").[a1].Resize(UBound(bb), UBound(bb, 2)) = bb
Set Dic = Nothing
End Sub |
评分
-
2
查看全部评分
-
|