本帖最后由 shiruiqiang 于 2022-11-27 15:05 编辑
Sub text()
Dim arr, brr
Dim x, y, k
arr = Sheets(1).UsedRange
ReDim brr(1 To UBound(arr), 1 To 14)
For x = 4 To UBound(arr)
If InStr(arr(x, 4), "建投公司") > 0 And InStr(arr(x, 6), “封控") > 0 Then
k = k + 1
brr(k, 1) = arr(x, 1)
brr(k, 2) = arr(x, 2)
brr(k, 3) = arr(x, 3)
brr(k, 4) = arr(x, 7)
brr(k, 5) = arr(x, 8)
brr(k, 6) = arr(x, 9)
brr(k, 7) = arr(x, 10)
brr(k, 8) = arr(x, 11)
brr(k, 9) = arr(x, 12)
brr(k, 10) = arr(x, 13)
brr(k, 11) = arr(x, 14)
brr(k, 12) = arr(x, 15)
brr(k, 13) = arr(x, 16)
brr(k, 14) = arr(x, 17)
End If
Next
Sheets(2).[a4].Resize(k, 14) = brr
End Sub
|