Referencing another Workbook with Indirect

Marcelo Branco

MrExcel MVP
Joined
Aug 23, 2010
Messages
17,103
Office Version
  1. 2021
  2. 2010
Platform
  1. Windows
Hi,

There is a workbook named Data with 31 worksheets named sequentially 1, 2, 3 .....31 (for each day of the month) where A1, B1 and C1 house the final results of each day.

In another workbook (same directory) , Report, the user wants to summarize the data using a formula and dragging down to get the data from every day.

To get A1 i tried this
=INDIRECT("[Data.xlsx]"&ROWS($1:1)&"!A1")
copy down

It worked but i'm facing two issues:
1. If the Data workbook has not been opened before, the formula generates a #REF.
2. If opened, after closing, any new calculation at Report provokes a #REF.

Is there another way, using formulas (i prefer to avoid VBA), to do this and get the data from A1, B1 and C1 even when Data.xlsx has not been opened?

Any help would be appreciated.

M.
 

Excel Facts

What did Pito Salas invent?
Pito Salas, working for Lotus, popularized what would become to be pivot tables. It was released as Lotus Improv in 1989.
Why don't you just type in the exact formulas; e.g.
='[Data.xlsx]1'!A1
='[Data.xlsx]2'!A1
.etc

It's just 31 formulas where you only have to change one number. You can then drag\copy the 31 formulas to the next two columns to get B1 and C1.
 
Upvote 0
Addition to post #2
To save some typing, if you have Data.xlsx open, on the Report sheet you can type in an equal sign and then click on Data.xlsx and select a sheet and a cell. Excel will fill in the reference for you.
 
Upvote 0
Why don't you just type in the exact formulas; e.g.
='[Data.xlsx]1'!A1
='[Data.xlsx]2'!A1
.etc

It's just 31 formulas where you only have to change one number. You can then drag\copy the 31 formulas to the next two columns to get B1 and C1.

Tks for your quick answer.

Yes, i can type the formulas - not so much effort - but i was curious if it was possible find out an automate solution to use in the future on a more complicated (or bigger) scenario.

M.
 
Upvote 0

Forum statistics

Threads
1,214,571
Messages
6,120,302
Members
448,954
Latest member
EmmeEnne1979

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