Hello
I have this problem. I am trying to make several files that grab information from another workbook with loads of rows with lots of data. So I'm trying to use the vlookup function to grab that information when it is required. I am not really good at this and all I know I've learned it myself so sorry if there are many many mistakes. Here is what I've written
Sub Buscar()
Dim anexo As Variant
Dim cliente As String
Dim maturity As Date
Dim contacto As String
Dim contactod As String
Dim responsable As String
Dim texto As String
Dim i As Integer
Dim fecha As String
Dim evento As String
Dim referencia As String
'buscar info general
texto = InputBox("Introducir número de anexo")
Range("C5") = texto
anexo = texto
Workbooks.Open Filename:="C:\Users\Ana Méndez\Desktop\Caralogo base.xlsx"
Sheets("Anexos").Activate
cliente = WorksheetFunction.VLookup(anexo, Range("A1", "F1000"), 2, False)
maturity = WorksheetFunction.VLookup(anexo, Range("A1", "F1000"), 3, False)
contacto = WorksheetFunction.VLookup(anexo, Range("A1", "F1000"), 4, False)
contactod = WorksheetFunction.VLookup(anexo, Range("A1", "F1000"), 5, False)
responsable = WorksheetFunction.VLookup(anexo, Range("A1", "F1000"), 6, False)
Workbooks.Open Filename:="C:\Users\Ana Méndez\Desktop\Formato 1.xlsm"
Sheets("Formato").Activate
Range("c7") = cliente
Range("c8") = maturity
Range("c9") = contacto
Range("c10") = contactod
Range("c11") = responsable
Thank you for all of your help!
Bookmarks