Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
kestrel
 
Posts: n/a
Default Inserting variables within file names


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.


--
kestrel
------------------------------------------------------------------------
kestrel's Profile: http://www.excelforum.com/member.php...o&userid=19082
View this thread: http://www.excelforum.com/showthread...hreadid=552254

  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Bob Phillips
 
Posts: n/a
Default Inserting variables within file names

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)

"kestrel" wrote in
message ...

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.


--
kestrel
------------------------------------------------------------------------
kestrel's Profile:

http://www.excelforum.com/member.php...o&userid=19082
View this thread: http://www.excelforum.com/showthread...hreadid=552254



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
kestrel
 
Posts: n/a
Default Inserting variables within file names


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


--
kestrel
------------------------------------------------------------------------
kestrel's Profile: http://www.excelforum.com/member.php...o&userid=19082
View this thread: http://www.excelforum.com/showthread...hreadid=552254

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Bob Phillips
 
Posts: n/a
Default Inserting variables within file names

No idea I am afraid, I have never used it.

--

HTH

Bob Phillips

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

"kestrel" wrote in
message ...

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


--
kestrel
------------------------------------------------------------------------
kestrel's Profile:

http://www.excelforum.com/member.php...o&userid=19082
View this thread: http://www.excelforum.com/showthread...hreadid=552254



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
File A and File B Together BillCPA Excel Discussion (Misc queries) 1 June 6th 06 03:18 PM
EXCEL97 FILE NAMES TRUNCATED TO THE FIRST LETTER IN THE FILE NAME Geoff Porter New Users to Excel 6 May 25th 06 08:31 PM
Blank File Names spinner Gordomart Excel Discussion (Misc queries) 1 December 7th 05 03:52 PM
Import file names S.G.Pillai Excel Discussion (Misc queries) 4 September 28th 05 04:11 PM
Import file names into cells craigwojo Excel Worksheet Functions 2 November 2nd 04 11:19 PM


All times are GMT +1. The time now is 04:17 PM.

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"