参与一下。。。
- Sub ykcbf() '//2024.8.28
- Application.ScreenUpdating = False
- With Sheets("表1")
- r = .UsedRange.Find("*", , -4163, , 1, 2).Row
- c = .Cells.SpecialCells(11).Column
- arr = .[a1].Resize(r, c)
- ReDim brr(1 To r, 1 To 3)
- For i = 11 To UBound(arr)
- If InStr(arr(i, 3), "-") Then
- m = m + 1
- brr(m, 1) = arr(i, 22)
- brr(m, 2) = arr(i, 27)
- brr(m, 3) = arr(i, 41)
- End If
- Next
- End With
- With Sheets("表2")
- .[d7].Resize(m, 1) = Application.Index(brr, 0, 1)
- .[f7].Resize(m, 1) = Application.Index(brr, 0, 2)
- .[h7].Resize(m, 1) = Application.Index(brr, 0, 3)
- End With
- Application.ScreenUpdating = True
- MsgBox "OK!"
- End Sub
复制代码
|