Indirect function across other workbook with multiple sheets

g3org

Board Regular
Joined
Jul 25, 2021
Messages
69
Office Version
  1. 365
Platform
  1. Windows
Hello to everyone,
I am trying to import a range of cells from one workbook to another and i am facing some issues.
I have two workbooks with around 500 sheets each one and I want the range of cells A1:K38 from Book1 to be transferred to Book2. Each Workbooks has the sheets with the same name and in each sheet i have one cell that contain the name of the sheet. Any suggestion is well received.

Thank you in advance!
 

Excel Facts

Format cells as currency
Select range and press Ctrl+Shift+4 to format cells as currency. (Shift 4 is the $ sign).
Is this is one-time copy, or do you need it to be dynamic, i.e., Book2 must be constantly kept up to date as Book1 changes?

Which cell contains the sheet name?

This can be done with INDIRECT but Book1 will have to have to be open. If it is not open, the formulas with INDIRECT will return a #REF error.

As an example, if the sheet name is in cell L1 you can put this formula in cell A1 and fill down and to the right to K38:

Excel Formula:
=INDIRECT("[Book1.xlsx]"&$L$1&"!"&CELL("address",A1))

With 500 sheets I suspect you are going to need to use VBA.
 
Upvote 0
Solution
You are great, many thanks! For me works perfect.
 
Upvote 0

Forum statistics

Threads
1,214,406
Messages
6,119,330
Members
448,888
Latest member
Arle8907

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