Excel VBA Lookup Functions
I have created a function using VBA (below) which assigns a vlookup value in
the calling cell. Code is below.
Function CreateHierachy(AccountParentID As String) As Variant
CreateHierachy = "=vlookup(" & AccountParentID & ",
$A$2:$G$65536,7,False)"
End Function
Above code has been simplified.
The function retrieves the string "=vlookup(1, $A$2:$G$65536,7,False)"
excluding the quotes. I want the cell to read the vlookup value as a formula
(not a string).
How can I do this within the function?
Thanks dudes.
|