|
[广告] Excel易用宝 - 提升Excel的操作效率 · Excel / WPS表格插件 ★ 免费下载 ★ ★ 使用帮助★
Sub test()
' QQ 494585639
Dim r%, i%
Dim str
Dim arr, brr
Dim crr(1 To 10000, 1 To 7)
Dim d As Object
Set d = CreateObject("scripting.dictionary")
With Worksheets("Sheet1")
r = .Cells(.Rows.Count, 2).End(xlUp).Row
arr = .Range("b1:h" & r)
For i = 1 To UBound(arr)
str = arr(i, 1) & "," & arr(i, 2) & "," & arr(i, 3) & "," & arr(i, 4) & "," & arr(i, 5) & "," & arr(i, 6) & "," & arr(i, 7)
d(str) = ""
Next
r = .Cells(.Rows.Count, 10).End(xlUp).Row
brr = .Range("j1:p" & r)
For i = 1 To UBound(brr)
str = brr(i, 1) & "," & brr(i, 2) & "," & brr(i, 3) & "," & brr(i, 4) & "," & brr(i, 5) & "," & brr(i, 6) & "," & brr(i, 7)
If d.exists(str) Then
m = m + 1
For j = 1 To 7
crr(m, j) = brr(i, j)
Next
End If
Next
.Range("r1:x10000").ClearContents
.Range("r1").Resize(UBound(crr), 7) = crr
End With
End Sub
|
评分
-
1
查看全部评分
-
|