Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10
Default Vlookup Loop

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

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,510
Default Vlookup Loop

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.)


--
Regards,

OssieMac


"James" wrote:

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

.

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
using vlookup in a loop chrismv48 Excel Programming 2 September 19th 08 09:15 PM
loop and vlookup NewToVB Excel Programming 5 July 26th 07 02:44 PM
Add loop to Vlookup Les Excel Programming 1 April 19th 07 04:05 AM
Need a vb loop for vlookup [email protected] Excel Programming 3 August 25th 05 12:32 PM
Need a vb loop for vlookup [email protected] Excel Programming 2 August 24th 05 04:07 PM


All times are GMT +1. The time now is 09:14 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"