copy value from unopened workbook

formularye

New Member
Joined
May 12, 2011
Messages
3
Hi,

I am new to this but I haven't found a thread to match what I am trying to do.

For work, I have several excel files: "(Date) Time and Expense.xls
I am constantly adding new files to this folder: C:\Expense Reports.

What I am trying to do is copy the same cells (E5:K5) from each old and new files to a summary excel workbook. I want to be able to enter in the previous mentioned (Date) in a cell or text box, possibly click a created button and gather the information from that excel file without having to open each file individually. I know Indirect function requires to open each file to gather the information.
Ive done programming in the past, but I am new to VBA.

Thanks in advance,
Ryan
 

Excel Facts

Easy bullets in Excel
If you have a numeric keypad, press Alt+7 on numeric keypad to type a bullet in Excel.
Welcome to the Board!

You can use INDIRECT.EXT, which is part of the MoreFunc add in, or check out Ole Erlandsen's ADO/DAO page for referencing closed workbooks, although that's a VBA approach, but he lays it out pretty well.

HTH,
 
Last edited:
Upvote 0
The cell I have and am using has the following:
=INDIRECT.EXT("'C:\Expense Reports\["&$B11&" Time & Expense.xls]Expense Report'!E5")

Where B11 is the changing date of each file. This cell is a text format.
When I added the .ext, instead of the #REF! error when the file is closed i get #NAME? error even when the file is open.
 
Upvote 0
Ah Ha, Thanks. Makes more sense now that the function shows up on the list when I type it in. I couldn't find where to download at that website you had, but I searched for it and found it. Thanks Again.
 
Upvote 0

Forum statistics

Threads
1,224,596
Messages
6,179,807
Members
452,944
Latest member
2558216095

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