Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / Worksheet Functions / June 2006

Tip: Looking for answers? Try searching our database.

Inserting variables within file names

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
kestrel - 15 Jun 2006 15:20 GMT
Not sure if this can be done, but you never know.

I have a spreadsheet which imports data from various other
spreadsheets, using simple formuals like:

=C:\folder\[spreadsheet.xls]Book1!$Y$12

However, from time-to-time, I need to change the names of the files,
and add in new files.

So I tried to a formula with something like:

="C:\folder\["&A5&"spreadsheet.xls]Book1!$Y$12"

With A5 containing the change in file name (my spreadsheets would be
something like applespreadsheet.xls, orangespreadsheet.xls etc.)

This of course does not work.

Does anyone know of a way I could insert a variable as part of the file
name?

Many thanks for your help.

Signature

kestrel

Bob Phillips - 15 Jun 2006 16:19 GMT
The technique used here would be INDIRECTing, but that doesn't work with
closed workbooks.  See http://makeashorterlink.com/?F2993260A for an
alternative solution, it is VBA but it works.

--

HTH

Bob Phillips

(replace xxxx in the email address with gmail if mailing direct)

> Not sure if this can be done, but you never know.
>
[quoted text clipped - 25 lines]
> kestrel's Profile: http://www.excelforum.com/member.php?action=getinfo&userid=19082
> View this thread: http://www.excelforum.com/showthread.php?threadid=552254
kestrel - 16 Jun 2006 11:27 GMT
Hi, thanks.

I have tried Laurent Longre's MOREFUNC.XLL using indirect.ext

Here is my formula
=INDIRECT.EXT("'C:\folder\["&I2&".xls]Book1!$Y$12")

However, this returns a #VALUE!

Is this the correct way to use the formula?

Thanks

Signature

kestrel

Bob Phillips - 16 Jun 2006 20:00 GMT
No idea I am afraid, I have never used it.

--

HTH

Bob Phillips

(replace xxxx in the email address with gmail if mailing direct)

> Hi, thanks.
>
[quoted text clipped - 14 lines]
> kestrel's Profile: http://www.excelforum.com/member.php?action=getinfo&userid=19082
> View this thread: http://www.excelforum.com/showthread.php?threadid=552254
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.