I am trying to pull data out of a large spreadsheet using VBA. Column A contains ID's which can repeat depending on the data stored in it.
For example i have
ID Value1 Value2
1111 item1 item2
1111 item3 item4
2222 item3 item4
3333 item3 item4
3333 item3 item4
I enter the ID into a spreadsheet then want to use VBA to Vlookup the ID then pull the Values from column B and C into another spreadsheet.
Heres what i have
Sub populate()
Dim ID As String
Dim Value1 As String
ID = Range("D5")
Value1 = Application.WorksheetFunction.VLookup(ID, Worksheets("Required").Range("A4:J1913"), 2, False)
Response = Application.WorksheetFunction.VLookup(ID, Worksheets("Required").Range("A4:J1913"), 7, False)
Worksheets("Coversheet").Range("D8") = Value1
Worksheets("Coversheet").Range("D10") = Value2
Dim Value1address As Long
Value1address = VarPtr(Value1)
Worksheets("Coversheet").Range("D15").Value = Cells(Value1address).Offset(1, 0)
End Sub
The code works excatly how i want, except for the last 3 lines. I am trying to get an offset from Value1 by 1 row, however it is saving as a blank, and consequently puts a blank value into Cell D15.
Can anyone help me solve this problem, or how i can easily take data from the following rows after the Vlookup?

