How to put a correct vlookup range(other sheet) in vba?

i´m trying this code in vba but in the vlookup part, vba doesn´t bring anything. "Pareo Cecos" is another sheet from the workbook. Please, help me.

'''Sub Macro3()''' ' ' Macro3 Macro ' Worksheets("Altas").Select

ActiveCell.FormulaR1C1 = "=VLOOKUP(RC[-9],'Pareo Cecos'!C[1]:C[4],3,0)"
Range("M3").Select
Selection.AutoFill Destination:=Range("M3", "M" & Cells(Rows.Count, 1).End(xlUp).Row)
Range("M3", "M" & Cells(Rows.Count, 1).End(xlUp).Row).Select
Selection.Copy
Range("D3", "D" & Cells(Rows.Count, 1).End(xlUp).Row).Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
    :=False, Transpose:=False
Range("M3", "M" & Cells(Rows.Count, 1).End(xlUp).Row).Select
Application.CutCopyMode = False
Selection.ClearContents
Range("A2").Select
Range(Selection, Selection.End(xlToRight)).Select
Selection.Copy
Range(Selection, Selection.End(xlDown)).Select
Selection.PasteSpecial Paste:=xlPasteFormats, Operation:=xlNone, _
    SkipBlanks:=False, Transpose:=False
Rows("2:2").Select
Application.CutCopyMode = False
Selection.Delete Shift:=xlUp

End Sub



from Recent Questions - Stack Overflow https://ift.tt/3vuqxZW
https://ift.tt/eA8V8J

Comments

Popular posts from this blog

Today Walkin 14th-Sept

Spring Elasticsearch Operations

Hibernate Search - Elasticsearch with JSON manipulation