user3333321
user3333321

Reputation: 23

In excel, which function is similar to INDIRECT?

I have a large number of excel files that I need to use for getting data. I am looking for a function similar to INDIRECT, in order not to be necessary to have the files open to get the values. Can you help?

Thank you

Upvotes: 0

Views: 1408

Answers (3)

D_Bester
D_Bester

Reputation: 5901

You don't really need =INDIRECT() or ADO or even VBA. Just reference the closed worksheet like this in a cell: ='S:\Temp\[T.xls]Sheet1'!$C$4

It will update the values upon opening the workbook; you don't need to have the source workbook open at all. Or you can update them manually by choosing Edit Links from the Data tab in Excel.

Upvotes: 0

jlee88my
jlee88my

Reputation: 3043

In your VBA, you need to first open the workbook: Workbooks.Open() Then you can use Workbooks("xxx").Worksheets("").Cells() or Range() [depending on what you want to do]. When you are done taking out the info/data, then you close that worksheet.

Upvotes: 0

Gary's Student
Gary's Student

Reputation: 96753

Consider using ADO..............here is a reference:

Microsoft ADO Reference

Upvotes: 1

Related Questions