I saw this in another post and I thought that if it was reworded, it might
make it easier to understand. In the formula below, at the point where it
says quot;Book2.xlsquot;, I was wondering if there would be a way to have quot;2quot;
designated by the contents of a cell in the current worksheet. For example,
A1 contains 2. It could be any number, but I want the file reference to
change based on the contens of A1. Is this possible?
='C:\temp\[Book2.xls]Sheet1'!$D$1
Thanks,
Paul
Yes and no, if the linked workbook is open (so no need for the path) you can
use INDIRECT
=INDIRECT(quot;'[Bookquot;amp;A1amp;quot;]Sheet1'!D1quot;)
if not there are some workarounds, easiest is probably a UDF, Harlan Grove
has a function called PULL and Laurent Longre has an add-in called Morefunc
that has a function called INDIRECTT
ftp://members.aol.com/hrlngrv/
xcell05.free.fr/
--
Regards,
Peo Sjoblom
quot;PCLIVEquot; gt; wrote in message
...
gt; I saw this in another post and I thought that if it was reworded, it might
gt; make it easier to understand. In the formula below, at the point where it
gt; says quot;Book2.xlsquot;, I was wondering if there would be a way to have quot;2quot;
gt; designated by the contents of a cell in the current worksheet. For
example,
gt; A1 contains 2. It could be any number, but I want the file reference to
gt; change based on the contens of A1. Is this possible?
gt;
gt; ='C:\temp\[Book2.xls]Sheet1'!$D$1
gt;
gt; Thanks,
gt; Paul
gt;
gt;
Thanks Peo,
As you said, it does work if the workbook is open. However, since the
Workbook reference is subject to change based on A1, then this won't be the
route that I'll take. I will look into the other suggestions you gave.
Thanks again,
Paul
quot;Peo Sjoblomquot; gt; wrote in message
...
gt; Yes and no, if the linked workbook is open (so no need for the path) you
gt; can
gt; use INDIRECT
gt;
gt; =INDIRECT(quot;'[Bookquot;amp;A1amp;quot;]Sheet1'!D1quot;)
gt;
gt; if not there are some workarounds, easiest is probably a UDF, Harlan Grove
gt; has a function called PULL and Laurent Longre has an add-in called
gt; Morefunc
gt; that has a function called INDIRECTT
gt;
gt; ftp://members.aol.com/hrlngrv/
gt;
gt; xcell05.free.fr/
gt;
gt;
gt;
gt; --
gt;
gt; Regards,
gt;
gt; Peo Sjoblom
gt;
gt; quot;PCLIVEquot; gt; wrote in message
gt; ...
gt;gt; I saw this in another post and I thought that if it was reworded, it
gt;gt; might
gt;gt; make it easier to understand. In the formula below, at the point where
gt;gt; it
gt;gt; says quot;Book2.xlsquot;, I was wondering if there would be a way to have quot;2quot;
gt;gt; designated by the contents of a cell in the current worksheet. For
gt; example,
gt;gt; A1 contains 2. It could be any number, but I want the file reference to
gt;gt; change based on the contens of A1. Is this possible?
gt;gt;
gt;gt; ='C:\temp\[Book2.xls]Sheet1'!$D$1
gt;gt;
gt;gt; Thanks,
gt;gt; Paul
gt;gt;
gt;gt;
gt;
gt;
- Aug 28 Tue 2007 20:38
Designating a workbook reference base on a cells contents
close
全站熱搜
留言列表
發表留言