View Single Post
  #5   Report Post  
Harlan Grove
 
Posts: n/a
Default

gpie wrote...
Thanks for your response, Harlan. I think I am misunderstanding how
your PULL function works. I have answered your questions below.
Thanks again for your help!

Harlan Grove wrote:

....
[reformatted]
In this workbook, _5230Rows is defined as
='[Detail Account Budgets.xls]5230'!$B$51:$B$70


This is the problem with pull. When this other workbook is open, this
defined name resolves to a range reference. When it's closed, this
resolves to an array. pull would choke on either. pull requires a text
argument that looks like a fully qualified external reference - drive,
full directory path, filename, and either worksheet name and range
address or defined name IN THAT OTHER FILE.

Detail Account Budget.xls is the external workbook. So I am not
referring to a name in an external workbook, the name refers to the
external workbook. Should I set it up the opposite way?

....

You can't use pull with this defined name, but you could use pull with
the defined name XRB referring to the string-valued expression

="<your drive/directory path here\[Detail Account Budgets.xls]"

Note that I'm not including the initial delimiting single quote. Then
you should be able to use pull in

=MATCH($B$3,pull("'"&XRB&B99&&"'!$B$51:$B$70"))

I thought that INDEX($Er, $Fr, COLUMN(G$6)) should work in Columns G-R
however it returns #REF!


Are you sure you don't mean you thought

INDEX( INDIRECT( $Er ), $Fr, COLUMN(G$6))

should work?


No, that formula does work, as long as I have the other workbook open.
If I hard-code the formula as INDEX(_5230,_5230Rows,COLUMN(G$6)) it
works even with the other book closed, I'm not really sure why $Er
needs the INDIRECT to work. The cell looks like _5230

....

So $Er does need to be inside INDIRECT? If so, the reason is that Er
evaluates to a string, "_5230", not to a range reference. INDIRECT
converts the string "_5230" into a range reference when the other
workbook is open, in which case it can return a range reference. The
hardcoded formula always works because _5230 (without quotes) is a
range reference rather than a text string.

Here is one example, using the INDEX function above

=INDEX(PULL($E22),$F22,COLUMN(G$6))


What's E22? If it's just "_5230", pull will choke on it. See my
comments about using defined name XRB above.