Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2
Default Variable in a filename reference in Excel 2000


I am working on a spreadsheet that compiles data from other spreadsheets. I
refer to data in the other spreadsheets with a formula like the one below:

=[filename.xls]Sheet1!$B$1

I would like to have a cell where I could change the filename, and have all
of cells that use that filename change. In other words, I would like to have
a variable in the formulas that refers to the file, like this:

=["variable".xls]Sheet1!$B$1

So I could specify that the variable is filename1, run my calculations, then
specify that the variable is filename2 and run the next set of calculations,
and so on.

Is this possible? If so, how do you do it?

Thanks for your help!
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 35,218
Default Variable in a filename reference in Excel 2000

You'd want to use the =indirect() function, but that only works when the
"sending" workbook is open.

But Harlan Grove wrote a UDF called PULL that will retrieve the value from a
closed workbook.

You can find the function at Harlan's FTP site:
ftp://members.aol.com/hrlngrv/
Look for pull.zip

Laurent Longre has an addin (morefunc.xll) at:
http://xcell05.free.fr/

That includes =indirect.ext() that may help you.

pdabill wrote:

I am working on a spreadsheet that compiles data from other spreadsheets. I
refer to data in the other spreadsheets with a formula like the one below:

=[filename.xls]Sheet1!$B$1

I would like to have a cell where I could change the filename, and have all
of cells that use that filename change. In other words, I would like to have
a variable in the formulas that refers to the file, like this:

=["variable".xls]Sheet1!$B$1

So I could specify that the variable is filename1, run my calculations, then
specify that the variable is filename2 and run the next set of calculations,
and so on.

Is this possible? If so, how do you do it?

Thanks for your help!


--

Dave Peterson
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
Cell Protection over Excel 2000 and 2003 Achez Excel Discussion (Misc queries) 3 June 6th 06 07:50 PM
How do I create a List in Excel 2000 Watch Online Excel Worksheet Functions 1 January 31st 06 07:45 PM
Activate method of Worksheet class fails in Excel 2000 Chris Bloom Excel Discussion (Misc queries) 3 September 10th 05 12:05 AM
Value Errors with EXCEL XP not showing up in EXCEL 2000 goodguy Links and Linking in Excel 0 July 19th 05 02:38 PM
how to convert GETPIVOTDATA from excel 2000 to excel 2002... Need_help_on_excel Excel Worksheet Functions 1 March 15th 05 01:08 AM


All times are GMT +1. The time now is 10:26 AM.

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

About Us

"It's about Microsoft Excel"