|
[广告] Excel易用宝 - 提升Excel的操作效率 · Excel / WPS表格插件 ★ 免费下载 ★ ★ 使用帮助★
请问大神, 本小白大概知道加总如何搞了!!想要改求平均,要如何改
现在就是无法把每个重复次数带进,总不能些上 除以4 吧!!!重复次数会依采样次数而不同!! 谢谢大家!!
Sub sss()
arr = [a2].CurrentRegion
Set d1 = CreateObject("scripting.dictionary")
Set d2 = CreateObject("scripting.dictionary")
For i = 1 To UBound(arr)
d1(arr(i, 1) & " " & arr(i, 2)) = d1(arr(i, 1) & " " & arr(i, 2)) + arr(i, 3)
d2(arr(i, 1) & " " & arr(i, 2)) = d2(arr(i, 1) & " " & arr(i, 2)) + arr(i, 4)
Next
i = 0
For Each k In d1.Keys
i = i + 1
Cells(i, 7).Resize(, 2) = Split(k)
Cells(i, 9) = d1(k)
Cells(i, 10) = d2(k)
Next
End Sub
|
|