Macro for Lookup

macdca

Board Regular
Joined
Sep 28, 2010
Messages
170
Can anyone tell me how to write a macro for a VLOOK up procedure, lining to a worksheet which looks up over 2 worksheets?

Thanks
 
OK, where did you put the code? It has to go in a regular module. Press ALT + F11 to open the Visual Basic Editor, select Module from the Insert menu then paste in the code.
 
Upvote 0

Excel Facts

Workdays for a market open Mon, Wed, Friday?
Yes! Use "0101011" for the weekend argument in NETWORKDAYS.INTL or WORKDAY.INTL. The 7 digits start on Monday. 1 means it is a weekend.
Thets working now (very slowly however!), great thanks! I had hped however that i could have this in a macro rather than having to paste a formula, i have another macro in the sheet which will split the file into wider areas based on this new look up column. To import the data and press oe macro button for the look up and the splitting into sheets would be ideal, is there any way this can be done?
 
Upvote 0

Forum statistics

Threads
1,224,609
Messages
6,179,882
Members
452,948
Latest member
Dupuhini

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top