Hello, good morning, my colleagues, I have a question that I have not yet been able to solve, it turns out that I have two excel books A and B, in one of them one record as a database and in the other a list of product codes and what I want is to look for the data in book B according to the code of the book A with macros Vlookup some help will be very grateful thank you !. Here I leave a few lines of code. Application.CutCopyMode = False
conteo As Long
Dim Marca As Variant
Dim Rango As Variant
Dim Archivo As String
Dim bCarpeta As String
Dim codigoBuscado As String
Dim Final As Long
bCarpeta = ActiveWorkbook.Path & "\"
Archivo = Dir(bCarpeta & "Maestro Dinet" & "*.xl*")
Workbooks.OpenText Filename:=Archivo
Application.ScreenUpdating = False
Archivo = ActiveWorkbook.Name
Windows(Archivo).Activate
ActiveCell.FormulaR1C1 = _
"=VLOOKUP(RC[-5],'[Maestro Dinet.xlsb]01'!C1:C38,31,0)"
Range("G5").Select
Selection.AutoFill Destination:=Range("G5:G86") ', Type:=xlFillDefault
MsgBox "Proceso terminado", vbInformation, "Resultado"