VBA to use vlookup with multiple workbooks

latiff9

New Member
Joined
Mar 24, 2012
Messages
1
Hi I am a newbie in vba and would like to seek help in a problem that I am facing. I am using excel 2003.

I have 15 similar files in which I want to extract data using vlookup. The range to look for is F3:T43, and the info I want to extract are in column 2,5,6 and 7. I want to put these into a new worksheet.

Manually I know how to do this. The formula that I would key in the cells would be something like ths

= vlookup(cell(j,i),F3:T43,2,FALSE) then for adjacent cell
= vlookup(cell(j,i+1),F3:T43,5,FALSE) etc

But I am not sure how to write a VBA to loop this through all the 15 files and put the values in sequence; ie for first workbook the data extracted will be stored in column c,d,e and f. While for the the second workbook into column g,h,i and j. Then I have to repeat that for j no of rows that I have.

Appreciate if anyone can help.
 

Excel Facts

Wildcard in VLOOKUP
Use =VLOOKUP("Apple*" to find apple, Apple, or applesauce

Forum statistics

Threads
1,216,073
Messages
6,128,634
Members
449,460
Latest member
jgharbawi

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