Quantcast
Channel: Excel Help Forum - Excel Programming / VBA / Macros
Viewing all articles
Browse latest Browse all 50085

Use VLOOKUP function in macro with Variable Name for Lookup value

$
0
0
Hi Friends,

I used VLookup function in macro. Lookup value is a variable name. I don't know how to use variable name inside of VLOOKUP function.
Use VLOOKUP function in macro with Variable Name for Lookup value

Function CC(CName As String)

ActiveCell.FormulaR1C1 = "=VLOOKUP(cname,'[Structure File.xlsx]Sheet1'!C1:C3,2,FALSE)"

End Function

Please tell me how to use CName variable inside of Vlookup funtion.

Thanks

Viewing all articles
Browse latest Browse all 50085

Trending Articles