Dynamic reference to another workbook

Saibot

New Member
Joined
Oct 18, 2011
Messages
2
Hi,

I am registering data in a weekly workbook (A) and treating these data in another weekly workbook (B). In this process I would like the workbook name in the formula for retrieving data in workbook (B) to update automatically with week number from an input cell.

Specifically I have the following CSE formula for retrieving data in (B) from (A):

=SUM(VLOOKUP(B14;'[OEE loggskjema_Finstykk_ 2011 week1.xlsx]Mandag'!$B:$BJ;{2;3;4;5;6;7;8;9;10;11};FALSE))

In this formula only the number after "week" changes. Is there a way to link this to a cell so I can enter the week number and the formula automatically updates?

Any help greatly appreciated!
 

Excel Facts

Which Excel functions can ignore hidden rows?
The SUBTOTAL and AGGREGATE functions ignore hidden rows. AGGREGATE can also exclude error cells and more.
Welcome to MrExcel.

You can use INDIRECT, but the workbook must be open. If the week number is in A1 on the sheet containing the formula try:

=SUM(VLOOKUP(B14;INDIRECT("'[OEE loggskjema_Finstykk_ 2011 week"&A1&".xlsx]Mandag'!$B:$BJ");{2;3;4;5;6;7;8;9;10;11};FALSE))
 
Upvote 0
Thank you Andrew!

The formula you posted worked nicely. However, is there a way to do this without having the workbook that contains the input data open?

Thanks
 
Upvote 0

Forum statistics

Threads
1,216,170
Messages
6,129,277
Members
449,498
Latest member
Lee_ray

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