I am having an issue getting my value I copied to paste in to my autofilter. I have created a loop that will work down a list , copy the next value, past that value in an autofilter on a new sheet, copy the results found, and paste the section to the original sheet. The code will work down the list but I can't get the new copied values to carry over to the auto filter on the new sheet. Any ideas? Below is the code i have so far.</SPAN>
Code:
Sub Loop2()
Dim Order As Range
Dim LR As Long
Dim I As Integer
LR = Sheets("b").Range("A200000").End(xlUp).Row
Sheets("B").Select
For I = 1 To LR
Sheets("A").Select
Rows("1:1").Select
Selection.AutoFilter
Sheets("b").Select
Sheets("b").Range("C2:x752").ClearContents
Sheets("B").Select
Cells(I).Select
Selection.Copy
'The line below is where i get the error while trying to paste selection in criteria1
Sheets("A").Range("$A$1:$R$22").AutoFilter Field:=1, Criteria1:=Selection.Paste
Application.Goto Reference:="filterselection"
Range("A1:O77736").Select
Selection.Copy
Sheets("B").Select
Range("C2:X732").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Sheets("A").Select
Range("C2:Q2").ClearContents
Rows("1:1").Select
Selection.AutoFilter
Next I
End Sub