Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
tocguy
 
Posts: n/a
Default indirect using name

I've got a Globally Defined Name "BusName" that equates to
{=INDIRECT(dbName&"F4:F"&dbLastRow)}. It serves as a lookup array to a range
of cells and works as intended. "dbName" and "dbLastRow" are also names where
"dbName" is the name of a particular Worksheet and dbLastRow if the number of
the last row containing data on that Worksheet.

While upgrading the analysis spreadsheet, I attempted to move "BusName" to a
cell on a worksheet thus replacing the Defined Name; "BusName" now points to
the same formula but within a cell. Now, "BusName" returns only the first
cell of the array referenced by {=INDIRECT(dbName&"F4:F"&dbLastRow)}.

Why does the same formula with the same name built with the same variables
act differently on the Worksheet level as opposed to the Workbook level? The
formula includes the worksheet name so the reference appears to be complete.
What gives?
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Harlan Grove
 
Posts: n/a
Default indirect using name

"tocguy" wrote...
....
While upgrading the analysis spreadsheet, I attempted to move "BusName" to
a
cell on a worksheet thus replacing the Defined Name; "BusName" now points
to
the same formula but within a cell. Now, "BusName" returns only the first
cell of the array referenced by {=INDIRECT(dbName&"F4:F"&dbLastRow)}.

Why does the same formula with the same name built with the same variables
act differently on the Worksheet level as opposed to the Workbook level?
The
formula includes the worksheet name so the reference appears to be
complete.
What gives?


This has nothing to do with worksheet vs workbook level names and everything
to do with names defined as expressions vs names referring to
literal/constant ranges.

Excel evaluates names as their values. For names referring to expressions
rather than ranges, e.g., X referring to ={1,2}+{3;4}, the value of the name
X is the value of the expression, in this case, {4,5;5,6}, so an array of 4
values. For names referring to ranges, e.g., Y referring to cell Y99 in
which Y99 contains the formula ={1,2}+{3;4} whether entered as an array
formula or not, the value of the range Y99 is the value of *ONLY* cell Y99,
i.e., 4. The only way Y referring to a range could return an array of values
is for it to be defined as the multiple cell range Y99:Z100 with Y99:Z100
together containing the array formula ={1,2}+{3;4}.

So you were too clever. Since your referent range would seem to vary in
size, it'd be wasteful to use up another range dereferencing it. You should
revert to BusName referring to the expression
=INDIRECT(dbName&"F4:F"&dbLastRow).


  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
tocguy
 
Posts: n/a
Default indirect using name

OMG I need aspirin. ;)
Thanks Harlan, I believe you've answered my question I'm just not sure how.
Perhaps a little more discussion will help. Given your reply, the more I
study it it seems as though the issue is still unresolved. What puzzles me is
that I've got other local names that return arrays from other sheets using
the same methodology, e.g., ACdbK1
{=INDIRECT("'Summary'!"&ADDRESS(5,6)&":"&ADDRESS(d bLastRow,8))}. This returns
a 3 * dbLastRow array. Then, I can use ACdbK1 in other array formulae and it
works as intended. So, there's nuance to this that escapes me.
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
Indirect Range Referencing jeaton Charts and Charting in Excel 0 February 10th 06 02:25 PM
Copying a formulae down a column that includes an INDIRECT A.Webb Excel Discussion (Misc queries) 10 January 14th 06 03:42 AM
Using the Indirect function with a sheet number instead of a sheet name JDB Excel Worksheet Functions 5 December 31st 05 03:03 PM
Indirect function - Limitations Ken Cobler Excel Worksheet Functions 2 September 16th 05 04:59 PM
referencing named formula using INDIRECT function [email protected] Excel Worksheet Functions 19 May 11th 05 09:48 AM


All times are GMT +1. The time now is 02:23 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"