excel用VBA实现搜索某些符合条件的行,并复制到另外一个sheet?
发布网友
发布时间:2023-08-10 17:11
我来回答
共1个回答
热心网友
时间:2023-08-14 20:43
Sub tty()
Dim point As Integer
Sheet1.Activate
point = 1
num = ThisWorkbook.ActiveSheet.Range("D65536").End(xlUp).Row
For i = 1 To num
If InStr(Cells(i, 4), "-101") > 0 And LCase(Cells(i, 17)) <> "ok" Then
Cells(i, 4).EntireRow.Select
Selection.Copy
Sheet4.Cells(point, 1).PasteSpecial
point = point + 1
End If
Next i
End Sub