请教统计问题
请教统计问题。谢谢!顶~~~~~~~~~~~~~~~~~~~~~~~ 后面是模拟的结果?是个数? Sub kkk()
Dim rng As Range, reg As Object, arr(1 To 9999, 1 To 6)
Set reg = CreateObject("vbscript.regexp")
reg.Global = True
reg.Pattern = "\d+"
Set rngs = Range("v9,y9,ab9,ad9,af9,ag9")
n = 0
For Each rng In rngs
Set m = reg.Execute(rng)
n = n + 1
arr(1, n) = m.Count
For i = 1 To m.Count
arr(i + 1, n) = m(i - 1)
Next
Next
Range("al1:aq9999").Value = arr
End Sub 后面是模拟的结果,就是统计后的个数 您这不是自定义函数,但还是谢谢。 请写个自定义函数,谢谢!
页:
[1]