deeds said:
Sorry for the troubles....now I can't seem to get the formula to
work...it is giving me a "The formula contains an error..."
message. I setup your exact example...here is my formula:
=VLOOKUP(A1,pull("'"&c:\foo\[deleteme.xls]&A&"'!"&$B$2:$C$8),2)
What is the problem with this?? Thanks again.
....
You need to use double quotes around "c:\foo\[deleteme.xls]", "A" and
"$B$2:$C$8", so the formula needs to be
=VLOOKUP(A1,pull("'"&"c:\foo\[deleteme.xls]"&"A"&"'!"&"$B$2:$C$8"),2)
In your formula above, the c:\foo\[deleteme.xls] would be a syntax
error, A would have been interpreted as a defined names in the calling
workbook (the workbook containing the formula containing the pull
call), and $B$2:$C$8 would have been evaluated as an array of the
values in the same worksheet in the calling workbook.
pull's one & only argument is a STRING. It may be easier to construct
its string argument in a different cell with a leading equal sign,
e.g.,
X99:
="='"&"c:\foo\[deleteme.xls]"&"A"&"'!"&"$B$2:$C$8"
which should evaluate to
='c:\foo\[deleteme.xls]A'!$B$2:$C$8
Copy that cell and paste special as value into another cell, then in
that other cell press [F2] then [Enter] or for multiple cell ranges
[Shift]+[Ctrl]+[Enter]. That'll enter the string as a formula. If THAT
doesn't evaluate correctly, there's a problem in your reference that
has nothing to do with pull.
If this constructed literal external reference works, then use it in
the pull call, e.g.,
=VLOOKUP(A1,pull(MID(X99,2,255)),2)
where the MID call skips over the leading = in the X99 formula. In
other words, if you get the pasted-as-value result of the X99 formula
to evaluate correctly as a literal external reference, pull should
evaluate correctly using MID(X99,2,255) as its argument.