I copy one cell ("A2") in excel, then on a different Sheet I filter the first column with some values. In the second column I want to paste the value which I copy from A2. How can I do that using macros?
Col1 Col2
a
b
b
a
At the end I want to see:
Col1 Col2
a 10
b
b
a 10
Sub Macro()
Range("A1").Select
ActiveCell.FormulaR1C1 = "a"
Sheets("Sheet2").Select
Cells.Select
Selection.AutoFilter
ActiveSheet.Range("$A$1:$B$5").AutoFilter Field:=1, Criteria1:="a"
Range("B2:B5").Select
End Sub
The code is not complete of course.