Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
RichT
 
Posts: n/a
Default Creating Linked Workbook file name using cell variables

Anyone know of a way to create a linked workbook file name using cell
variables.

I have a workbook that will pull in data from a .cvs file generated daily.
The date (yyyymmdd) included in the file name changes each day. Was looking
for a way to grab the date from the master spreadsheet header and build the
..csv file name. Was hoping to not have to manually create a new file name
for each day of the month. Something along the lines "daily_data_(cell
R1).cvs" == daily_data_20050101.cvs

Thanks

RichT
  #2   Report Post  
Duke Carey
 
Posts: n/a
Default

This solution requires that the CSV file be open

=INDIRECT("daily_data_"&R1&".cvs")


"RichT" wrote:

Anyone know of a way to create a linked workbook file name using cell
variables.

I have a workbook that will pull in data from a .cvs file generated daily.
The date (yyyymmdd) included in the file name changes each day. Was looking
for a way to grab the date from the master spreadsheet header and build the
.csv file name. Was hoping to not have to manually create a new file name
for each day of the month. Something along the lines "daily_data_(cell
R1).cvs" == daily_data_20050101.cvs

Thanks

RichT

  #3   Report Post  
RichT
 
Posts: n/a
Default

Looked into using INDIRECT, but with 365 .csv files (1 for each day) that is
not going to work. Is there any way to do this without having to open the
..csv file first??

Thanks

"Duke Carey" wrote:

This solution requires that the CSV file be open

=INDIRECT("daily_data_"&R1&".cvs")


"RichT" wrote:

Anyone know of a way to create a linked workbook file name using cell
variables.

I have a workbook that will pull in data from a .cvs file generated daily.
The date (yyyymmdd) included in the file name changes each day. Was looking
for a way to grab the date from the master spreadsheet header and build the
.csv file name. Was hoping to not have to manually create a new file name
for each day of the month. Something along the lines "daily_data_(cell
R1).cvs" == daily_data_20050101.cvs

Thanks

RichT

  #4   Report Post  
Duke Carey
 
Posts: n/a
Default

Search this newsgroup for INDIRECT.EXT, a function written by one of the MVPs
here, I think. I know little about it or whether it will do the trick, but
understand that it's supposed to work on closed files. There may also be one
called PULL, and those are my only other ideas for you.


"RichT" wrote:

Looked into using INDIRECT, but with 365 .csv files (1 for each day) that is
not going to work. Is there any way to do this without having to open the
.csv file first??

Thanks

"Duke Carey" wrote:

This solution requires that the CSV file be open

=INDIRECT("daily_data_"&R1&".cvs")


"RichT" wrote:

Anyone know of a way to create a linked workbook file name using cell
variables.

I have a workbook that will pull in data from a .cvs file generated daily.
The date (yyyymmdd) included in the file name changes each day. Was looking
for a way to grab the date from the master spreadsheet header and build the
.csv file name. Was hoping to not have to manually create a new file name
for each day of the month. Something along the lines "daily_data_(cell
R1).cvs" == daily_data_20050101.cvs

Thanks

RichT

  #5   Report Post  
Harlan Grove
 
Posts: n/a
Default

RichT wrote...
Looked into using INDIRECT, but with 365 .csv files (1 for each day)

that is
not going to work. Is there any way to do this without having to open

the
.csv file first??


Is it really so difficult to test?

It's not possible to use explicit/hardcoded external reference links
into closed CSV files, e.g., formulas like

='x:\y\[z.csv]z'!AB321

If explicit references won't work, derived references have no chance at
all.

Your *ONLY* choices a
1. open all 365 (366 in leap years) CSV files, like it or not;
2. write a macro to read through these CSV files in sequence, storing
desired values in worksheet cells;
3. use something other than Excel to do the data extraction into a
summary CSV
file, and open/import that in/into Excel.

Actually, there's another option: convert all these CSV files to XLS
files. There are techniques for extracting data from closed *XLS* files.



  #6   Report Post  
RichT
 
Posts: n/a
Default

Thanks -- was afraid the .csv file format was the problem. Actually it is
356/6 files time number of locations (currently at 4 and growing) - hence the
desire not to have to open the files. Looks like it's back to the drawing
board. Again thanks for the assist.

"Harlan Grove" wrote:

RichT wrote...
Looked into using INDIRECT, but with 365 .csv files (1 for each day)

that is
not going to work. Is there any way to do this without having to open

the
.csv file first??


Is it really so difficult to test?

It's not possible to use explicit/hardcoded external reference links
into closed CSV files, e.g., formulas like

='x:\y\[z.csv]z'!AB321

If explicit references won't work, derived references have no chance at
all.

Your *ONLY* choices a
1. open all 365 (366 in leap years) CSV files, like it or not;
2. write a macro to read through these CSV files in sequence, storing
desired values in worksheet cells;
3. use something other than Excel to do the data extraction into a
summary CSV
file, and open/import that in/into Excel.

Actually, there's another option: convert all these CSV files to XLS
files. There are techniques for extracting data from closed *XLS* files.


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Updating master workbook from source that may/may not exist [email protected] Excel Worksheet Functions 20 April 7th 05 03:37 PM
Update linked cells within a workbook??? Chance224 Links and Linking in Excel 4 January 21st 05 06:33 PM
linking cell value in one workbook to a cell in another workbook Jig Bhakta Links and Linking in Excel 1 January 20th 05 06:12 PM
Stubborn toolbars in Excel 007 Excel Discussion (Misc queries) 9 December 11th 04 02:02 PM
Using Name Label to try to define linked cell John Links and Linking in Excel 5 December 4th 04 09:12 AM


All times are GMT +1. The time now is 10:33 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"