microsoft excel course london - excel

Public Schedule Face-to-Face & Online Instructor-Led Training - View dates & book

Forum home » Delegate support and help forum » Microsoft Excel Training and help » microsoft excel course london - Excel

microsoft excel course london - Excel

resolvedResolved · Low Priority · Version Standard

Charlie has attended:
Excel VBA Intro Intermediate course

Excel

How do I create a macro based on vlookups

RE: Excel

Hi Charlie

Thankyou for your question

At its simplest you can invoke the Vlookup function in your code by using the Worksheetfunction property

For example

Range("A1").Value = WorksheetFunction.VLookup(arg1, arg2, arg3, [arg4])

Will return a lookup function with the relevant arguments into cell "A1" of the active worksheet.

You could either code the arguments directly or use variables that the user can define when the macro runs.

I hope this is helpful. If you have a specific task in mind, perhaps you could advise me of the details so I can look into it further

Regards

Stephen


 

Excel tip:

Saving your Excel Spreadsheet as a CSV File

In situations where you need to save your Excel spreadsheet as a CSV file, follow these simple steps.

Click the File tab and click Save As.
Enter a name in the File name field.
Click the drop-down arrow next to the Save as type field to select the file type. Scroll down the list and select CSV (comma delimited) (*.CSV)
Click Save

The data will now be saved to a separate CSV file which can be used in different applications.

View all Excel hints and tips


Server loaded in 0.09 secs.