'字典声明
Set dic = CreateObject("Scripting.Dictionary")
If Not dic.exists(Arr(1, col)) Then '查询字典是否存在
dic.Add Arr(1, col), col '新增字典 key + value
Else
MsgBox ("BOM中发现重复列名,请删除或改名字先!")
GoTo label1
End If
使用数组实现字典汇总
brr(d(s), 4) = brr(d(s), 4) + arr(i, 7)