VBA Code
Private Sub CommandButton1_Click()
Dim databook As Workbook
Application.ScreenUpdating = False
Set databook = Workbooks.Open(ThisWorkbook.Path & "/" & "Database.xlsm")
For x = 1 To 4
Sheet1.Cells(2, x) = Application.WorksheetFunction.VLookup(Sheet1.Cells(3, "E"), _
Sheets("Sheet1").Range("A:D"), x, 0)
Next x
databook.Close
Application.ScreenUpdating = True
End Sub
Download Workbook 1
Download Workbook 2
No comments:
Post a Comment
Please do not enter any spam message in comment box