I'm sure this is probably the most simple thing ever, but I'm really confused by this.
I have the following code in VBA:
For j = 0 To n
For i = 0 To 11
Dim y As Integer
y = Sheets("Checking").Cells(3 + j, 4 + (i * 4)).Value
Sheets("Checking").Cells(3 + j, 5 + (i * 4)).FormulaR1C1 = "=VLookup(A" & 3 + j & ",PPG," & y + 1 & ",0)"
Next i
Next j
This does what I need it to do, however when it inserts the VLookup formula into excel it comes out as =VLOOKUP('A3',PPG,2,0) with single quotes around the cell reference.
Why is it doing this, and how can I correct it?