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 VBA Training and help » Vlookup
Vlookup
Resolved · Low Priority · Version 2003
Kate has attended:
Excel VBA Intro Intermediate course
Vlookup
How to do you use Vlookup in macros..??
RE: Vlookup
Hi Kate
Sorry for the delay in answering this question.
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
Carlos
Training information:
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:Formula for last day of monthIn some cases it is necessary to find the last day of a month for a given date. If you use the following formula, you can achieve this, ie; if you have a column of dates, use this formula to find the end of month for each day by using the fill handle. The formula is as follows, and assumes in this example that the first date in question is in cell C5, in any other cell type; =DATE(YEAR(C5),MONTH(C5)+1,1)-1 |