I have 2 worksheets
ID Amount
A 50
B 60
C 10
A 10 <== Sheet1
what im trying to do is to filter the sheet1, which is all amount greater than 50 will be copy to sheet2 the problem is if A is already in sheet2 all A should be in sheets2 regarding their amount
Here's my code
Sub Test()
Dim john As Variant
Dim r As Range
Dim JCena As Range
Dim JLo As Range
Set JCena = Sheets("Sheet1").Range("A2:A110")
Set JLo = Sheets("Sheet2").Range("A2:A110")
For Each Cell In Sheets(1).Range("B:B")
If Cell.Value >= 50 Then
matchRow = Cell.Row
Rows(matchRow & ":" & matchRow).Select
Selection.Copy
Sheets("Sheet2").Select
ActiveSheet.Rows(matchRow).Select
ActiveSheet.Paste
Sheets("Sheet1").Select
End If
If JLo.Value = JCena.Value Then
matchRow = Cell.Row
Rows(matchRow & ":" & matchRow).Select
Selection.Copy
Sheets("Sheet2").Select
ActiveSheet.Rows(matchRow).Select
ActiveSheet.Paste
Sheets("Sheet1").Select
End If
Next
End Sub
#Rumba





