Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 19
Default import =[test.xls]Sheet1!A1 - help

I'm importing data from .xls reports created each day. The file will
include the date.

Is it possible the file is called "Test 01-05-2008.xls", I could
create a string something like:

=[test +"A3"+ .xls]Sheet1!A1 // Where A3 is 01-05-2008

Help appreciated.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default import =[test.xls]Sheet1!A1 - help

The function you'd want to use that's built into excel is =indirect(). But that
function returns an error if the sending workbook is closed.

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

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

========
Try opening "Test 01-05-2008.xls" first (easier to test).

Then in a worksheet in a different workbook, put the date in A1.

Then try this:
=INDIRECT("'[test " & TEXT(A1,"mm-dd-yyyy") & ".xls]sheet1'!A1")

(is 01-05-2008 January 5, 2008 or May 1, 2008???? Change that =text() format
the way you need).

After you have that working, you can try using =indirect.ext(). You'll have to
add the drive/path, so that it looks something like:

=INDIRECT.ext("'c:\excel\[test " & TEXT(A1,"mm-dd-yyyy") & ".xls]sheet1'!A1")

But that's a guess. I don't use that addin.

But lots of people do. If you have trouble getting it to work, post back with
the drive/folder name and what you've tried. I'll bet you get help!

AMaleThing wrote:

I'm importing data from .xls reports created each day. The file will
include the date.

Is it possible the file is called "Test 01-05-2008.xls", I could
create a string something like:

=[test +"A3"+ .xls]Sheet1!A1 // Where A3 is 01-05-2008

Help appreciated.


--

Dave Peterson
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 16
Default import =[test.xls]Sheet1!A1 - help

The indirect formula allows you to type in any value and use it as a cell (or
range?) reference. For example if you type =A1 into cell C1, whatever you
have typed into A1 will also be in cell C1. if you type ="A"&"1" in cell C1
you literally get "A1" in cell C1. If you enclose that formula in an indirect
statement =INDIRECT("A"&"1") you will once again get whatever was typed into
cell A1. Indirect changes the text "A1" into a cell reference. You can
substitue the value of a cell as a cell reference, for example D1="A1" and
cell C1=indirect(D1) then the value of C1 will be whatever is in A1.

"AMaleThing" wrote:

I'm importing data from .xls reports created each day. The file will
include the date.

Is it possible the file is called "Test 01-05-2008.xls", I could
create a string something like:

=[test +"A3"+ .xls]Sheet1!A1 // Where A3 is 01-05-2008

Help appreciated.

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
Copy from file1 sheet1/file2 sheet1 last blank row Tasha Excel Programming 2 August 22nd 07 08:24 PM
[=Sheet1!A1] - if i use Column A1 ('Sheet1') / A2 ('Sheet2') Lawrence C H Tan Excel Worksheet Functions 0 January 19th 07 08:29 PM
How to import data from Sheet1 to Sheet2 in the order I want [email protected] Excel Discussion (Misc queries) 3 September 4th 06 04:17 PM
Display Rows From Sheet1 In Sheet2 (Import) Mythran Excel Worksheet Functions 1 March 24th 06 07:40 PM
Sheet1.Activate vs Sheet1.Select mikeburg[_46_] Excel Programming 4 October 11th 05 04:30 PM


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