参与一下。。。- Sub ykcbf() '//2024.1.16
- Dim arr, brr
- b = [{1,90,2,3,4,5,6,7,9,10,11,13}]
- ReDim brr(1 To 10000, 1 To 13)
- On Error Resume Next
- For Each sht In Sheets
- If InStr(sht.Name, "公司") Then
- x = InStr(sht.Name, "公司")
- fn = Left(sht.Name, x + 1)
- With sht
- arr = .UsedRange
- For i = 5 To UBound(arr)
- For j = 1 To 4
- If arr(i, j) = Empty Then arr(i, j) = arr(i - 1, j)
- Next
- If InStr(arr(i, 6), "√") Then
- m = m + 1
- brr(m, 1) = m
- brr(m, 2) = fn
- For j = 3 To UBound(b)
- brr(m, j) = arr(i, b(j))
- Next
- End If
- Next
- End With
- End If
- Next
- With Sheets("收集页面")
- .UsedRange.Offset(2).ClearContents
- .[a3].Resize(m, 12) = brr
- End With
- MsgBox "OK!"
- End Sub
复制代码
|