|
[广告] Excel易用宝 - 提升Excel的操作效率 · Excel / WPS表格插件 ★ 免费下载 ★ ★ 使用帮助★
改一下:
Sub tj()
Set sh = Sheets("10")
Set d = CreateObject("scripting.dictionary")
jsh = sh.[a15].End(xlUp).Row
arr = sh.Range("C6:AF" & jsh).Value
crr = sh.Range("AH5:AK5")
ReDim Brr(1 To jsh - 5, 1 To 4)
For i = 1 To UBound(arr)
d.RemoveAll
For j = 1 To UBound(arr, 2)
If arr(i, j) <> "" Then
d(arr(i, j)) = d(arr(i, j)) + 1
End If
Next
For m = 1 To UBound(crr, 2) - 1
Brr(i, m) = d(crr(1, m))
Next
Brr(i, 4) = Brr(i, 1) + Brr(i, 2)
Next
sh.[ah6].Resize(UBound(Brr), UBound(Brr, 2)) = Brr
Set d = Nothing
End Sub
|
评分
-
1
查看全部评分
-
|