98.7% Of all customers recommend us, we're so confident about our results we publish all reviews and stats
View Live Stats View ReviewsForum 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.
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
Training information:
See also:
Welcome. Please choose your application (eg. Excel) and then post your question. Our Microsoft Qualified trainers will then respond within 24 hours (working days). Frequently Asked Questions
Any suggestions, questions or comments? Please post in the Improve the forum thread. |
Excel tip:Use RANDBETWEEN to generate random numbersThere may be occassions where you need to generate random numbers in your spreadsheet. Use the RANDBETWEEN function to generate random numbers between two values that you specify. |