Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 89
Default variable path in a link

Is there a way to use a variable in the path of a link. I would like to be
able to define the variable by typing it is a specific cell then update all
my links accordingly

For example say I have workbooks named pOffice22, pOffice23 etc in a
folder. All of these files are the same except they contain data from
different weeks. I have a summary workbook that I use to perform various
reports on this data. The data is transferred into the summary workbook via
links.

I would like to be able to type 22 in a cell and get the data from file
pOffice 22 or type 23 in the cell and get the data from file pOffice23.

Any help will be greatly appreciated
Christy
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 15
Default variable path in a link

Take a look at the InDirect function in HELP

"Christy" wrote in message
...
Is there a way to use a variable in the path of a link. I would like to
be
able to define the variable by typing it is a specific cell then update
all
my links accordingly

For example say I have workbooks named pOffice22, pOffice23 etc in a
folder. All of these files are the same except they contain data from
different weeks. I have a summary workbook that I use to perform various
reports on this data. The data is transferred into the summary workbook
via
links.

I would like to be able to type 22 in a cell and get the data from file
pOffice 22 or type 23 in the cell and get the data from file pOffice23.

Any help will be greatly appreciated
Christy



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 89
Default variable path in a link

Thanks Gary but I don't see how that helps me.

I have a workbook that will get data from several different (closed)
workbooks via links. I want the paths in those links to be variable and be
able to define that variable in a cell.

If the source folder contains workbooks named; xName1, yName1, zName1,
xName2, yName2 and zName2 - I want to type 2 in a predetermined cell and
link to the data in xName2, yName2 and zName2.

"Gary Brown" wrote:

Take a look at the InDirect function in HELP

"Christy" wrote in message
...
Is there a way to use a variable in the path of a link. I would like to
be
able to define the variable by typing it is a specific cell then update
all
my links accordingly

For example say I have workbooks named pOffice22, pOffice23 etc in a
folder. All of these files are the same except they contain data from
different weeks. I have a summary workbook that I use to perform various
reports on this data. The data is transferred into the summary workbook
via
links.

I would like to be able to type 22 in a cell and get the data from file
pOffice 22 or type 23 in the cell and get the data from file pOffice23.

Any help will be greatly appreciated
Christy




  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,588
Default variable path in a link

=INDIRECT("[Week" & A1 & "]Sheet1!$A$1")

Where (eg) A1 has your week number

Tim



"Christy" wrote in message
...
Thanks Gary but I don't see how that helps me.

I have a workbook that will get data from several different (closed)
workbooks via links. I want the paths in those links to be variable
and be
able to define that variable in a cell.

If the source folder contains workbooks named; xName1, yName1,
zName1,
xName2, yName2 and zName2 - I want to type 2 in a predetermined
cell and
link to the data in xName2, yName2 and zName2.

"Gary Brown" wrote:

Take a look at the InDirect function in HELP

"Christy" wrote in message
...
Is there a way to use a variable in the path of a link. I would
like to
be
able to define the variable by typing it is a specific cell then
update
all
my links accordingly

For example say I have workbooks named pOffice22, pOffice23 etc
in a
folder. All of these files are the same except they contain data
from
different weeks. I have a summary workbook that I use to perform
various
reports on this data. The data is transferred into the summary
workbook
via
links.

I would like to be able to type 22 in a cell and get the data
from file
pOffice 22 or type 23 in the cell and get the data from file
pOffice23.

Any help will be greatly appreciated
Christy






  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default variable path in a link

INDIRECT will not work on closed workbooks. For that you need Harlan's Pull
routine http://tinyurl.com/5zsxx

--

HTH

RP
(remove nothere from the email address if mailing direct)


"Tim Williams" <saxifrax@pacbell*dot*net wrote in message
...
=INDIRECT("[Week" & A1 & "]Sheet1!$A$1")

Where (eg) A1 has your week number

Tim



"Christy" wrote in message
...
Thanks Gary but I don't see how that helps me.

I have a workbook that will get data from several different (closed)
workbooks via links. I want the paths in those links to be variable
and be
able to define that variable in a cell.

If the source folder contains workbooks named; xName1, yName1,
zName1,
xName2, yName2 and zName2 - I want to type 2 in a predetermined
cell and
link to the data in xName2, yName2 and zName2.

"Gary Brown" wrote:

Take a look at the InDirect function in HELP

"Christy" wrote in message
...
Is there a way to use a variable in the path of a link. I would
like to
be
able to define the variable by typing it is a specific cell then
update
all
my links accordingly

For example say I have workbooks named pOffice22, pOffice23 etc
in a
folder. All of these files are the same except they contain data
from
different weeks. I have a summary workbook that I use to perform
various
reports on this data. The data is transferred into the summary
workbook
via
links.

I would like to be able to type 22 in a cell and get the data
from file
pOffice 22 or type 23 in the cell and get the data from file
pOffice23.

Any help will be greatly appreciated
Christy







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
Excel variable for path Esgrimidor New Users to Excel 3 September 5th 09 09:15 PM
variable path Gerardo Links and Linking in Excel 1 June 12th 09 05:38 AM
can i link a variable cost code with a variable sum I need help!! Excel Discussion (Misc queries) 0 August 1st 08 11:40 AM
Path to a dll as a variable Torben Laursen Excel Programming 0 September 22nd 04 10:33 PM
put path in as variable Bruce Roberson Excel Programming 3 August 13th 03 11:13 PM


All times are GMT +1. The time now is 08:06 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"