Sub 无损检测数量统计表汇总()
t = Timer
读取Excel数据
Rows_M = 7 '首页行数
Rows_M_bt = 5 '首页标题行数
Rows_S = 10 '续页行数
Rows_S_bt = 5 '续页标题行数
Rows = UBound(ar1) '数据行数
If Rows < 1 Then MsgBox "没提取到数据,请检查!": Exit Sub
Set d1 = CreateObject("Scripting.Dictionary"): d1.CompareMode = vbTextCompare
ReDim BR1(1 To Rows, 1 To 20)
For i = 1 To UBound(ar1)
kw = Trim(ar1(i, 1))
If Not d1.Exists(kw) Then
m1 = m1 + 1
d1(kw) = m1
x1 = Split(kw, "-")
BR1(m1, 1) = Split(Split(kw, "(")(1), ")")(0) & "-" & x1(1) & "-" & x1(2)
BR1(m1, 2) = kw
BR1(m1, 3) = ar1(i, 11)
![](http://tiebapic.baidu.com/forum/w%3D580/sign=c07bfcf385cec3fd8b3ea77de688d4b6/3db6ba315c6034a827b6b9be8d134954082376c8.jpg?tbpicau=2024-09-12-05_44f4120999cd84c80b5cb7ebc2380170)
标黄的是不是出错的部位?麻烦大神帮忙看看,应该怎么处理。谢谢
t = Timer
读取Excel数据
Rows_M = 7 '首页行数
Rows_M_bt = 5 '首页标题行数
Rows_S = 10 '续页行数
Rows_S_bt = 5 '续页标题行数
Rows = UBound(ar1) '数据行数
If Rows < 1 Then MsgBox "没提取到数据,请检查!": Exit Sub
Set d1 = CreateObject("Scripting.Dictionary"): d1.CompareMode = vbTextCompare
ReDim BR1(1 To Rows, 1 To 20)
For i = 1 To UBound(ar1)
kw = Trim(ar1(i, 1))
If Not d1.Exists(kw) Then
m1 = m1 + 1
d1(kw) = m1
x1 = Split(kw, "-")
BR1(m1, 1) = Split(Split(kw, "(")(1), ")")(0) & "-" & x1(1) & "-" & x1(2)
BR1(m1, 2) = kw
BR1(m1, 3) = ar1(i, 11)
![](http://tiebapic.baidu.com/forum/w%3D580/sign=c07bfcf385cec3fd8b3ea77de688d4b6/3db6ba315c6034a827b6b9be8d134954082376c8.jpg?tbpicau=2024-09-12-05_44f4120999cd84c80b5cb7ebc2380170)
标黄的是不是出错的部位?麻烦大神帮忙看看,应该怎么处理。谢谢