I have created 2 separate Excel spreadsheet, 1 for my database and 1 for my sorting automation and VBA. It's basically look like this.
I am trying to add pole number to my end data (image 2) with VLOOKUP in VBA. I hope I can show pole number depend on the identifier number, so I used column 2 and 3. My code:
Dim i1 As Integer
Dim i2 As Integer
Dim t As Integer
i1 = Range("B3").Value
i2 = Range("E3").Value
For t = 0 To (i2 - i1)
Cells(t + 7, 1).Value = i1
Cells(t + 7, 2).Value = [VLOOKUP(i1,database2!B:C,2,FALSE)]
i1 = i1 + 1
Next t
But the result keep showing #N/A. Any help? Thanks