Dears,
I want to copy every row in sheet1 that contains the code of product which is in sheet2 to copy them in sheet3
I have this code but I cannot make it for multiple range for example to get the range of A:A in sheet2 or A1:A8000 and copy the rows that match in sheet3. It only works if I put the exact code of the product.
Sub Copy_Criteria_Text()
Application.ScreenUpdating = False
With ActiveSheet
.AutoFilterMode = False
With Range("A1", Range("A" & Rows.Count).End(xlUp))
.AutoFilter 1, "12X3456"
On Error Resume Next
.Offset(1).EntireRow.Copy Sheet3.Range("A" & Rows.Count).End(xlUp).Offset(1)
End With
.AutoFilterMode = False
End With
Application.ScreenUpdating = True
Sheet3.Select
End Sub
I gave only 2 examples but the actual criteria should work for 100+ product codes so something like A1:A200 in sheet2 can work or A:A like I wrote above.
Thank you in advance!
Bookmarks