vlookup

Forum home » Delegate support and help forum » Microsoft Excel VBA Training and help » Vlookup

Vlookup

resolvedResolved · Low Priority · Version 2003

Kate has attended:
Excel VBA Intro Intermediate course

Vlookup

How to do you use Vlookup in macros..??

Edited on Thu 4 Sep 2008, 10:50

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 courses

 

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
What does 'Resolved' mean?

Any suggestions, questions or comments? Please post in the Improve the forum thread.


 

Excel tip:

Formula for last day of month

In 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

View all Excel hints and tips


Server loaded in 0.08 secs.