Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Excel Dynamic Formula Building

Status
Not open for further replies.

twifosp

Programmer
Jul 25, 2003
186
US
I have a group of files I want to extract specific cells from and place into a single spreadsheet.

For example one of the files name is 20071022.csv.

So I can put the following =20071022.csv!$A$3 into a cell and it will give me the value for that cell.

The catch is I have a ton of these files and would like to do this automatically. So want I want to do is put the file name, which I already have in a list into column A.

20071022
20071029
ect ect

And then in the B column, build something like:

=A1&.csv!$a$3
=A2&.csv!$a$3

Obviously the above does not work. The idea is to take the text contents of A1 and combine them to the formula of b1 so I can process all of these files at once.

I know I can string text together by using ""&"" but I can't seem to get that to work in a formula, only cells that display and group text.

Any ideas?
 




Hi,

Check out the INDIRECT function.

Skip,

[glasses]Did you hear what happened when the OO programmer lost his library?...
He's now living in OBJECT poverty![tongue]
 
Hi Skip, thank you for the quick reply. I have not heard of the indirect function until now, thank you.



 
Oops, ok this might not work after all. The help file states:

MORE INFORMATION
The INDIRECT function will only return the result of a reference to an open file. If a workbook that the INDIRECT function is indirectly referencing is closed (not open in memory) the function will return a #REF! error.

The idea with this project is to avoid having to open thousands of files.

Any other ideas?
 




Guess what! Your REFERENCE will only update when the link source is open, INDIRECT or NOT!!!

Skip,

[glasses]Did you hear what happened when the OO programmer lost his library?...
He's now living in OBJECT poverty![tongue]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top