|
[广告] VBA代码宝 - VBA编程加强工具 · VBA代码随查随用 · 内置多项VBA编程加强工具 ★ 免费下载 ★ ★ 使用手册★
Sub ttt()
Dim x%, y%, d, m%
Set d = CreateObject("scripting.dictionary")
For y = 1 To 4 Step 3
For x = 3 To Cells(2, y).End(xlDown).Row
If Not d.exists(Cells(x, y).Value & Cells(2, y + 1).Value) Then
d(Cells(x, y).Value & Cells(2, y + 1).Value) = Cells(x, y + 1)
End If
Next
Next
For m = 3 To [g3].End(xlDown).Row
Cells(m, "h") = d(Cells(m, "g").Value & Cells(2, "h").Value)
Cells(m, "i") = d(Cells(m, "g").Value & Cells(2, "i").Value)
Next
Set d = Nothing
End Sub |
评分
-
1
查看全部评分
-
|