|
另一个森森清单模板中有工程保护密码,无法修改代码并上传,但估计代码差不多,将代码改为:
Sub 汇总()
Dim Arr, i%, sht, j%, Brr()
Sheets("汇总表").Range("A2:H10000").ClearContents
For Each sht In Sheets
Debug.Print sht.Name
If InStr("汇总, 清单模板, 装箱单,标识贴,打印模板,标识贴(备份)", sht.Name) = 0 Then
Arr = sht.UsedRange
For i = 6 To UBound(Arr)
If Len(Arr(i, 6)) > 0 Then
If Arr(i, 6) <> 0 Then
j = j + 1
ReDim Preserve Brr(1 To 8, 1 To j)
Brr(1, j) = Arr(4, 3) & Arr(4, 6) & Arr(i, 3)
Brr(2, j) = Arr(4, 3)
Brr(3, j) = "'" & Arr(4, 6)
Brr(4, j) = Arr(i, 3)
Brr(5, j) = Arr(i, 4)
Brr(6, j) = Arr(i, 6)
Brr(7, j) = Split(sht.Name, "日")(0) & "日"
End If
End If
Next i
End If
Next sht
Sheets("汇总表").Cells(2, 1).Resize(UBound(Brr, 2), UBound(Brr)) = Application.Transpose(Brr)
End Sub |
|