Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 4
Default Using a variable to represent the pathname in a formula

Hi,

I have a number of "child" spreadsheets that rely on a master spreadsheet
for their input. Calculations and charting are performed in the "child"
spreadsheets for different departments.

I need to refer to the master spreadsheet using a variable. For example, if
the master spreadsheet is located at \\server\share\folder1\folder2, I need
to be able to set this location to a variable, call it location, and then in
my "child" spreadsheets be able to enter something like

='location\[spreadsheet.xls]Sheet1'!$A$1

or perform more complex calculations.

Can this be done?

thanks

Dave


  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 390
Default Using a variable to represent the pathname in a formula

In , David Jones
spake thusly:

I need to refer to the master spreadsheet using a
variable. For example, if the master spreadsheet is located at
\\server\share\folder1\folder2, I need to be able to set this
location to a variable, call it location, and then in my "child"
spreadsheets be able to enter something like

='location\[spreadsheet.xls]Sheet1'!$A$1


Can't you just map the path to a drive letter in your operating
system (which seems to be Windows)? From the Windows Explorer with
the directory highlighted, click on the Tools menu and and select
"Map Network Drive".

-dman-
  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 4
Default Using a variable to represent the pathname in a formula

Yes that is an option, however I would prefer using a UNC address as I will
be maintaining both a live and development copy of the spreadsheets and
would prefer to simply change a variable rather than remapping a drive.

thanks for your comments.


"Dallman Ross" <dman@localhost. wrote in message
...
In , David Jones
spake thusly:

I need to refer to the master spreadsheet using a
variable. For example, if the master spreadsheet is located at
\\server\share\folder1\folder2, I need to be able to set this
location to a variable, call it location, and then in my "child"
spreadsheets be able to enter something like

='location\[spreadsheet.xls]Sheet1'!$A$1


Can't you just map the path to a drive letter in your operating
system (which seems to be Windows)? From the Windows Explorer with
the directory highlighted, click on the Tools menu and and select
"Map Network Drive".

-dman-



  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 35,218
Default Using a variable to represent the pathname in a formula

You'd want to use =indirect() to build that string/formula.

But =indirect() won't work when the sending workbook is closed.

You may want to consider just changing the link via Edit|links.

But if you want to try...

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.

David Jones wrote:

Hi,

I have a number of "child" spreadsheets that rely on a master spreadsheet
for their input. Calculations and charting are performed in the "child"
spreadsheets for different departments.

I need to refer to the master spreadsheet using a variable. For example, if
the master spreadsheet is located at \\server\share\folder1\folder2, I need
to be able to set this location to a variable, call it location, and then in
my "child" spreadsheets be able to enter something like

='location\[spreadsheet.xls]Sheet1'!$A$1

or perform more complex calculations.

Can this be done?

thanks

Dave


--

Dave Peterson
  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 4
Default Using a variable to represent the pathname in a formula

Thanks,

I'll have a look at Harlan's work

Regards

Dave

"Dave Peterson" wrote in message
...
You'd want to use =indirect() to build that string/formula.

But =indirect() won't work when the sending workbook is closed.

You may want to consider just changing the link via Edit|links.

But if you want to try...

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.

David Jones wrote:

Hi,

I have a number of "child" spreadsheets that rely on a master spreadsheet
for their input. Calculations and charting are performed in the "child"
spreadsheets for different departments.

I need to refer to the master spreadsheet using a variable. For example,
if
the master spreadsheet is located at \\server\share\folder1\folder2, I
need
to be able to set this location to a variable, call it location, and then
in
my "child" spreadsheets be able to enter something like

='location\[spreadsheet.xls]Sheet1'!$A$1

or perform more complex calculations.

Can this be done?

thanks

Dave


--

Dave Peterson





  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 4
Default Using a variable to represent the pathname in a formula

Bingo!

Exactly what I needed from Laurent Longre

Many thanks

Dave

"David Jones" wrote in message
...
Thanks,

I'll have a look at Harlan's work

Regards

Dave

"Dave Peterson" wrote in message
...
You'd want to use =indirect() to build that string/formula.

But =indirect() won't work when the sending workbook is closed.

You may want to consider just changing the link via Edit|links.

But if you want to try...

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.

David Jones wrote:

Hi,

I have a number of "child" spreadsheets that rely on a master
spreadsheet
for their input. Calculations and charting are performed in the "child"
spreadsheets for different departments.

I need to refer to the master spreadsheet using a variable. For example,
if
the master spreadsheet is located at \\server\share\folder1\folder2, I
need
to be able to set this location to a variable, call it location, and
then in
my "child" spreadsheets be able to enter something like

='location\[spreadsheet.xls]Sheet1'!$A$1

or perform more complex calculations.

Can this be done?

thanks

Dave


--

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
How do I enter variable data into a formula Iain Mac Excel Discussion (Misc queries) 4 October 30th 06 05:27 PM
Cell variable in formula Tim desision support Excel Worksheet Functions 1 October 19th 06 02:49 PM
Aling multiple sets of data by header column MarkusO Excel Discussion (Misc queries) 2 April 12th 06 07:29 PM
Match then lookup Tenacity Excel Worksheet Functions 9 December 3rd 05 05:30 AM
Help with macro formula and variable Huge project Excel Worksheet Functions 0 December 28th 04 01:27 AM


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