Vlookup Loop

  • Thread starter Thread starter James
  • Start date Start date
J

James

Hi Everyone,

Cany anyone help me with writing a simple code to run every worksheet
in my workbook and do a same vlookup?

i.e.

- I have 10 different worksheets in same format (same number of
columns and rows as well)
- Lookup value is always A5 in each sheet
- Lookup range comes from different excel file called "finance.xls",
"Summary" tab column A to B

I am just trying to do 'Vlookup($A$5,'finance'A:B,2,false) in column B
starting from row 1 to row 2200 for every worksheet.

Please help

Thank you for your help in advance.


Regards


James
 
Hi James,

Need to confirm a few things.

Do I interpret your question correctly in that you want the result in the
cells B1:B2200 in each of the 10 worksheets in the workbook with the code? If
not in the workbook with the code, what is the name of the workbook?

If above is correct, are there any worksheets in the workbook that are to be
excluded? If so, can you list the worksheets to be excluded (or the
worksheets to be included).

Now do you want the formula in those cells so that it is volatile and will
change with recalculation or do you just want the calculated result?

Also, instead of using rows 1 to 2200, are there any columns in the
worksheets that have data in all rows? If so, what columns? (Better to find
the last row with data and that keeps the code dynamic if the number of rows
change.)
 
Back
Top