I wish to find a value in a worksheet table, which I can do as a function within the worksheet by using the VLookup function. I am trying to automate the calculation of this by placing it as part of a macro, but I can not find the syntax in the online help.


Can someone give me a sample code that shows how you use a worksheet
function (VLookup) within a VBA script, capture the result and then set the
value of a cell?

I know this doesn't work, but this is what I am looking for...

=vlookup(activecell.value,named_range,2,false)

Thank you!