Forum home » Delegate support and help forum » Microsoft Excel Training and help » Macros
Macros
Resolved · Low Priority · Version 2007
Sejal has attended:
Excel Advanced course
Macros
How to use a Macros with Vlookup formulas, and to link multiply spreadsheet.
For upcoming training course dates see: Pricing & availability
RE: Macros
Hi Sejal, thanks for your query. To use the VLOOKUP function in a macro you need to call up the macro with the following code:
Dim Answer As [Type] (Select the type to correspond to the type of value being returned)
Answer = Application.WorksheetFunction.VLookup(Arg1, Arg2, Arg3, [Arg4])
The arguments are the same as when running the VLOOKUP function in the worksheet
The WorksheetFunction command allows you to access all the functions found in Excel's Insert Function dialog box
Hope this helps,
Anthony
|
