|
[广告] Excel易用宝 - 提升Excel的操作效率 · Excel / WPS表格插件 ★ 免费下载 ★ ★ 使用帮助★
Option Explicit
Sub TEST6()
Dim ar, br, i&, j&, dic As Object
Application.ScreenUpdating = False
Set dic = CreateObject("Scripting.Dictionary")
ar = [C2].CurrentRegion.Value
br = [I2].CurrentRegion.Value
For j = 1 To UBound(ar, 2)
dic.RemoveAll
For i = 2 To UBound(ar)
dic(ar(i, j)) = dic(ar(i, j)) + 1
Next i
For i = 2 To UBound(br)
br(i, j + 1) = dic(br(i, 1)) * 1
Next i
Next j
[N2].Resize(UBound(br), UBound(br, 2)) = br
Set dic = Nothing
Application.ScreenUpdating = True
Beep
End Sub
|
评分
-
3
查看全部评分
-
|