I have a macro set up to populate the active cell with a vlookup formula based on cell entries offset to the left and above of the active cell...
Sub Lookup_Formula()
Dim c, d, e As String
c = ActiveCell.Offset(0, -4).Value
d = ActiveCell.Offset(0, -2).Value
e = ActiveCell.Offset(-2, 0).Value
ActiveCell.Formula = "=vlookup("" & c & ""," & d & "_overview," & e & ",false)"
End Sub
Unfortunately the macro returns it as
=VLOOKUP(" & c & ",Miscellaneous_Cross_Checks_overview,1,FALSE)
Can someone tell me how to add in the value of C with quotation marks, rather than how it is returning it as above.
Thank you in anticipation.
Sub Lookup_Formula()
Dim c, d, e As String
c = ActiveCell.Offset(0, -4).Value
d = ActiveCell.Offset(0, -2).Value
e = ActiveCell.Offset(-2, 0).Value
ActiveCell.Formula = "=vlookup("" & c & ""," & d & "_overview," & e & ",false)"
End Sub
Unfortunately the macro returns it as
=VLOOKUP(" & c & ",Miscellaneous_Cross_Checks_overview,1,FALSE)
Can someone tell me how to add in the value of C with quotation marks, rather than how it is returning it as above.
Thank you in anticipation.