我目前正在使用此代码查找和删除具有特定条件的所有行...如何编辑它以将行移动到另一个工作表而不是删除它们?
Sub Delete_Rows()
Dim selectedValue As Integer
myNum = Application.InputBox("Input Value")
Dim rng As Range, cell As Range, del As Range
Set rng = Intersect(Range("'potlife'!J2:J1500"), ActiveSheet.UsedRange)
For Each cell In rng
If (cell.value) = myNum _
Then
If del Is Nothing Then
Set del = cell
Else: Set del = Union(del, cell)
End If
End If
Next cell
On Error Resume Next
del.EntireRow.Delete
End Sub