amitcohen
Board Regular
- Joined
- Jan 14, 2010
- Messages
- 118
Hi
This code loop through list of criteria and move(cut) any row with a match.
How can I use a 'wild card' here?
Thanks for the help,
Amit.
This code loop through list of criteria and move(cut) any row with a match.
How can I use a 'wild card' here?
Code:
Dim TheRange As Range
Dim TheCell As Range
Set TheRange = Range("A1:E3500", Range("A65536").End(xlUp))
Dim R As Long
'Start check list by criteria
For i = 1 To 5 Step 1
For Each TheCell In TheRange.Cells
If TheCell = Sheets("Criteria").Range("A" & i).Value Then
R = TheCell.Row
Range(Cells(R, 1), Cells(R, 5)).Cut _
Destination:=Sheets("RemovedData").Range("A65536").End(xlUp).Offset(1, 0)
End If
Next TheCell
Next i
Thanks for the help,
Amit.