Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 181
Default reference to an external file

If I want to copy one cell from another file I will do

=[FileName.xls]SheetName!$I$10

But if I want the file to vary depending on a cell A1 value... I mean

If cell A1 value is equal to Q1 then file name will be [Q1 FileName.xls]
If cell A1 value is equal to Q2 then file name will be [Q2 FileName.xls]

How do I make a formula so the file name depend on the cell value
I tried [A1&" FileName.xls"]SheetName!$I$10 but did not work....
How can I do it?
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 8,520
Default reference to an external file

USE INDIRECT()

=INDIRECT("'[" & A1 & "FileName.xls]Sheetname'!$I$10")


'Try the below to get more familiar

In Book1, Sheet1, cell A1 type: "This is a test" (without the quotation
marks).
In Book2, Sheet1, cell A1 type: "Book1" (without the quotation marks).
In Book2, Sheet1, cell A2 type: "Sheet1" (without the quotation marks).
In Book2, Sheet1, cell A3 type: "A1" (without the quotation marks).
Save both workbooks.
In Book2, Sheet1, cell B1 type the following formula:

=INDIRECT("'["&A1&".xls]"&A2&"'!"&A3)

A1 = Workbook.xls
B1 = Sheet1
C1 = Hello
=INDIRECT("[" &A1 & "]" & B1 &"!" & "C1")

If this post helps click Yes
---------------
Jacob Skaria


"Alberto Ast" wrote:

If I want to copy one cell from another file I will do

=[FileName.xls]SheetName!$I$10

But if I want the file to vary depending on a cell A1 value... I mean

If cell A1 value is equal to Q1 then file name will be [Q1 FileName.xls]
If cell A1 value is equal to Q2 then file name will be [Q2 FileName.xls]

How do I make a formula so the file name depend on the cell value
I tried [A1&" FileName.xls"]SheetName!$I$10 but did not work....
How can I do it?

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 181
Default reference to an external file

It looks like it should work but my application is a little more complex
because I have SUMPRODUCT involved.... my actual formula on my cell is as
below

=IF(SUMPRODUCT(('[FM Serial Label Print Log -
R1.3.xls]Log'!$J$6:$J$15=F7)*('[FM Serial Label Print Log -
R1.3.xls]Log'!$K$6:$K$15<=G7)*('[FM Serial Label Print Log -
R1.3.xls]Log'!$L$6:$L$15=G7))0=FALSE,"Invalid
S/N",IF(E71,"Duplicate","Yes"))

Then I need the "FM" on the file name to depent in a cell value.
Can you help me out?


"Jacob Skaria" wrote:

USE INDIRECT()

=INDIRECT("'[" & A1 & "FileName.xls]Sheetname'!$I$10")


'Try the below to get more familiar

In Book1, Sheet1, cell A1 type: "This is a test" (without the quotation
marks).
In Book2, Sheet1, cell A1 type: "Book1" (without the quotation marks).
In Book2, Sheet1, cell A2 type: "Sheet1" (without the quotation marks).
In Book2, Sheet1, cell A3 type: "A1" (without the quotation marks).
Save both workbooks.
In Book2, Sheet1, cell B1 type the following formula:

=INDIRECT("'["&A1&".xls]"&A2&"'!"&A3)

A1 = Workbook.xls
B1 = Sheet1
C1 = Hello
=INDIRECT("[" &A1 & "]" & B1 &"!" & "C1")

If this post helps click Yes
---------------
Jacob Skaria


"Alberto Ast" wrote:

If I want to copy one cell from another file I will do

=[FileName.xls]SheetName!$I$10

But if I want the file to vary depending on a cell A1 value... I mean

If cell A1 value is equal to Q1 then file name will be [Q1 FileName.xls]
If cell A1 value is equal to Q2 then file name will be [Q2 FileName.xls]

How do I make a formula so the file name depend on the cell value
I tried [A1&" FileName.xls"]SheetName!$I$10 but did not work....
How can I do it?

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 8,520
Default reference to an external file

Check out the below link where you can download an add-in called Morefunc
which has a function called INDIRECT.EXT

http://xcell05.free.fr/morefunc/english/index.htm

If this post helps click Yes
---------------
Jacob Skaria


"Alberto Ast" wrote:

It looks like it should work but my application is a little more complex
because I have SUMPRODUCT involved.... my actual formula on my cell is as
below

=IF(SUMPRODUCT(('[FM Serial Label Print Log -
R1.3.xls]Log'!$J$6:$J$15=F7)*('[FM Serial Label Print Log -
R1.3.xls]Log'!$K$6:$K$15<=G7)*('[FM Serial Label Print Log -
R1.3.xls]Log'!$L$6:$L$15=G7))0=FALSE,"Invalid
S/N",IF(E71,"Duplicate","Yes"))

Then I need the "FM" on the file name to depent in a cell value.
Can you help me out?


"Jacob Skaria" wrote:

USE INDIRECT()

=INDIRECT("'[" & A1 & "FileName.xls]Sheetname'!$I$10")


'Try the below to get more familiar

In Book1, Sheet1, cell A1 type: "This is a test" (without the quotation
marks).
In Book2, Sheet1, cell A1 type: "Book1" (without the quotation marks).
In Book2, Sheet1, cell A2 type: "Sheet1" (without the quotation marks).
In Book2, Sheet1, cell A3 type: "A1" (without the quotation marks).
Save both workbooks.
In Book2, Sheet1, cell B1 type the following formula:

=INDIRECT("'["&A1&".xls]"&A2&"'!"&A3)

A1 = Workbook.xls
B1 = Sheet1
C1 = Hello
=INDIRECT("[" &A1 & "]" & B1 &"!" & "C1")

If this post helps click Yes
---------------
Jacob Skaria


"Alberto Ast" wrote:

If I want to copy one cell from another file I will do

=[FileName.xls]SheetName!$I$10

But if I want the file to vary depending on a cell A1 value... I mean

If cell A1 value is equal to Q1 then file name will be [Q1 FileName.xls]
If cell A1 value is equal to Q2 then file name will be [Q2 FileName.xls]

How do I make a formula so the file name depend on the cell value
I tried [A1&" FileName.xls"]SheetName!$I$10 but did not work....
How can I do it?

  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 10,124
Default reference to an external file

Have you tried using editreplace? You could have a macro do this that could
even be tied to a worksheet_change event that automatically fired when
changing your cell a1 from FM to ??

--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"Alberto Ast" wrote in message
...
It looks like it should work but my application is a little more complex
because I have SUMPRODUCT involved.... my actual formula on my cell is as
below

=IF(SUMPRODUCT(('[FM Serial Label Print Log -
R1.3.xls]Log'!$J$6:$J$15=F7)*('[FM Serial Label Print Log -
R1.3.xls]Log'!$K$6:$K$15<=G7)*('[FM Serial Label Print Log -
R1.3.xls]Log'!$L$6:$L$15=G7))0=FALSE,"Invalid
S/N",IF(E71,"Duplicate","Yes"))

Then I need the "FM" on the file name to depent in a cell value.
Can you help me out?


"Jacob Skaria" wrote:

USE INDIRECT()

=INDIRECT("'[" & A1 & "FileName.xls]Sheetname'!$I$10")


'Try the below to get more familiar

In Book1, Sheet1, cell A1 type: "This is a test" (without the quotation
marks).
In Book2, Sheet1, cell A1 type: "Book1" (without the quotation marks).
In Book2, Sheet1, cell A2 type: "Sheet1" (without the quotation marks).
In Book2, Sheet1, cell A3 type: "A1" (without the quotation marks).
Save both workbooks.
In Book2, Sheet1, cell B1 type the following formula:

=INDIRECT("'["&A1&".xls]"&A2&"'!"&A3)

A1 = Workbook.xls
B1 = Sheet1
C1 = Hello
=INDIRECT("[" &A1 & "]" & B1 &"!" & "C1")

If this post helps click Yes
---------------
Jacob Skaria


"Alberto Ast" wrote:

If I want to copy one cell from another file I will do

=[FileName.xls]SheetName!$I$10

But if I want the file to vary depending on a cell A1 value... I mean

If cell A1 value is equal to Q1 then file name will be [Q1
FileName.xls]
If cell A1 value is equal to Q2 then file name will be [Q2
FileName.xls]

How do I make a formula so the file name depend on the cell value
I tried [A1&" FileName.xls"]SheetName!$I$10 but did not work....
How can I do it?




  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 35,218
Default reference to an external file

First, if you're going to use =indirect(), then the sending file must be open.
You'll see an error if that sending workbook is not open.

=IF(SUMPRODUCT((indirect('["
& x9999 & " Serial Label Print Log - R1.3.xls]Log'!J6:J15")=F7)
* .....

If your file will be closed, then Laurent Longre has an addin (morefunc.xll) at:
http://xcell05.free.fr/
or
http://xcell05.free.fr/morefunc/english/index.htm

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

===
If you have trouble getting to the site, then search google for indirect.ext.

I found this alternative site:
http://download.cnet.com/Morefunc/30...-10423159.html

I didn't look to see if it was the most current version.

I'd check the original site every so often to see if it's working.



Alberto Ast wrote:

It looks like it should work but my application is a little more complex
because I have SUMPRODUCT involved.... my actual formula on my cell is as
below

=IF(SUMPRODUCT(('[FM Serial Label Print Log -
R1.3.xls]Log'!$J$6:$J$15=F7)*('[FM Serial Label Print Log -
R1.3.xls]Log'!$K$6:$K$15<=G7)*('[FM Serial Label Print Log -
R1.3.xls]Log'!$L$6:$L$15=G7))0=FALSE,"Invalid
S/N",IF(E71,"Duplicate","Yes"))

Then I need the "FM" on the file name to depent in a cell value.
Can you help me out?

"Jacob Skaria" wrote:

USE INDIRECT()

=INDIRECT("'[" & A1 & "FileName.xls]Sheetname'!$I$10")


'Try the below to get more familiar

In Book1, Sheet1, cell A1 type: "This is a test" (without the quotation
marks).
In Book2, Sheet1, cell A1 type: "Book1" (without the quotation marks).
In Book2, Sheet1, cell A2 type: "Sheet1" (without the quotation marks).
In Book2, Sheet1, cell A3 type: "A1" (without the quotation marks).
Save both workbooks.
In Book2, Sheet1, cell B1 type the following formula:

=INDIRECT("'["&A1&".xls]"&A2&"'!"&A3)

A1 = Workbook.xls
B1 = Sheet1
C1 = Hello
=INDIRECT("[" &A1 & "]" & B1 &"!" & "C1")

If this post helps click Yes
---------------
Jacob Skaria


"Alberto Ast" wrote:

If I want to copy one cell from another file I will do

=[FileName.xls]SheetName!$I$10

But if I want the file to vary depending on a cell A1 value... I mean

If cell A1 value is equal to Q1 then file name will be [Q1 FileName.xls]
If cell A1 value is equal to Q2 then file name will be [Q2 FileName.xls]

How do I make a formula so the file name depend on the cell value
I tried [A1&" FileName.xls"]SheetName!$I$10 but did not work....
How can I do it?


--

Dave Peterson
  #7   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 181
Default reference to an external file

Thanks.. it has very good infomation.. for now I will stay with your previous
tips.

"Jacob Skaria" wrote:

Check out the below link where you can download an add-in called Morefunc
which has a function called INDIRECT.EXT

http://xcell05.free.fr/morefunc/english/index.htm

If this post helps click Yes
---------------
Jacob Skaria


"Alberto Ast" wrote:

It looks like it should work but my application is a little more complex
because I have SUMPRODUCT involved.... my actual formula on my cell is as
below

=IF(SUMPRODUCT(('[FM Serial Label Print Log -
R1.3.xls]Log'!$J$6:$J$15=F7)*('[FM Serial Label Print Log -
R1.3.xls]Log'!$K$6:$K$15<=G7)*('[FM Serial Label Print Log -
R1.3.xls]Log'!$L$6:$L$15=G7))0=FALSE,"Invalid
S/N",IF(E71,"Duplicate","Yes"))

Then I need the "FM" on the file name to depent in a cell value.
Can you help me out?


"Jacob Skaria" wrote:

USE INDIRECT()

=INDIRECT("'[" & A1 & "FileName.xls]Sheetname'!$I$10")


'Try the below to get more familiar

In Book1, Sheet1, cell A1 type: "This is a test" (without the quotation
marks).
In Book2, Sheet1, cell A1 type: "Book1" (without the quotation marks).
In Book2, Sheet1, cell A2 type: "Sheet1" (without the quotation marks).
In Book2, Sheet1, cell A3 type: "A1" (without the quotation marks).
Save both workbooks.
In Book2, Sheet1, cell B1 type the following formula:

=INDIRECT("'["&A1&".xls]"&A2&"'!"&A3)

A1 = Workbook.xls
B1 = Sheet1
C1 = Hello
=INDIRECT("[" &A1 & "]" & B1 &"!" & "C1")

If this post helps click Yes
---------------
Jacob Skaria


"Alberto Ast" wrote:

If I want to copy one cell from another file I will do

=[FileName.xls]SheetName!$I$10

But if I want the file to vary depending on a cell A1 value... I mean

If cell A1 value is equal to Q1 then file name will be [Q1 FileName.xls]
If cell A1 value is equal to Q2 then file name will be [Q2 FileName.xls]

How do I make a formula so the file name depend on the cell value
I tried [A1&" FileName.xls"]SheetName!$I$10 but did not work....
How can I do it?

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
Concatenate path and file string for external reference Michael[_4_] Excel Worksheet Functions 5 May 21st 23 11:44 AM
how to call a reference to a cell in external file jose Excel Worksheet Functions 2 February 27th 07 09:59 AM
external reference to file in the same folder Ragnoff Excel Discussion (Misc queries) 1 July 15th 06 12:15 AM
How do I reference external data from a file, file name found in . Clux Excel Discussion (Misc queries) 1 February 10th 05 10:52 PM
External Reference Iain Excel Discussion (Misc queries) 3 February 8th 05 06:53 PM


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