Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 80
Default Why doesn't the INDIRECT function work when nested in FREQUENCY?

When I use {=FREQUENCY(INDIRECT($A$1),Bin_Range)} I get a column of #REF!.

A1 can contain one of two valid range names.
The frequency function works when either of the two are entered directly or
even when an IF function replaces the INDIRECT function e.g.
{=FREQUENCY(IF($B$1=1,Range1,Range2),Bin_Range)}

In all cases the formulae are entered as array functions.

Does anyone know why it doesn't work?

Regards

Phil
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 5,651
Default Why doesn't the INDIRECT function work when nested in FREQUENCY?

On Fri, 23 Feb 2007 01:10:00 -0800, Philip J Smith
wrote:

When I use {=FREQUENCY(INDIRECT($A$1),Bin_Range)} I get a column of #REF!.

A1 can contain one of two valid range names.
The frequency function works when either of the two are entered directly or
even when an IF function replaces the INDIRECT function e.g.
{=FREQUENCY(IF($B$1=1,Range1,Range2),Bin_Range) }

In all cases the formulae are entered as array functions.

Does anyone know why it doesn't work?

Regards

Phil



It works OK here. Could it be that your range name is referring to a closed
workbook?
--ron
  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 80
Default Why doesn't the INDIRECT function work when nested in FREQUENC

Thanks for the confirmation :-). Do you know if this is "fixed" in Excel 2007?

"Toppers" wrote:

Phil,
It does appear from further testing that you DO get an error if
the range is dynamic i.e. use OFFSET function.

"Philip J Smith" wrote:

Hi.

I have checked that several times, copying from a list of range names
generated from Insert, Name, Paste, Paste List.

Does it matter that the ranges are variable length ranges determined by the
OFFSET function?

e.g. tblAbsResidual
=OFFSET('ETM Cash Db and Regression'!$M$13,'ETM Cash Db and
Regression'!$Q$5,0,'ETM Cash Db and Regression'!$S$5-'ETM Cash Db and
Regression'!$Q$5,1)

Regards
Phil.

"Toppers" wrote:

Phil,
Works OK for me. Just check range name in A1 is correct as this
will give a #REF! error if incorrect.

"Philip J Smith" wrote:

When I use {=FREQUENCY(INDIRECT($A$1),Bin_Range)} I get a column of #REF!.

A1 can contain one of two valid range names.
The frequency function works when either of the two are entered directly or
even when an IF function replaces the INDIRECT function e.g.
{=FREQUENCY(IF($B$1=1,Range1,Range2),Bin_Range)}

In all cases the formulae are entered as array functions.

Does anyone know why it doesn't work?

Regards

Phil

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 80
Default Why doesn't the INDIRECT function work when nested in FREQUENC

Hi.

I have checked that several times, copying from a list of range names
generated from Insert, Name, Paste, Paste List.

Does it matter that the ranges are variable length ranges determined by the
OFFSET function?

e.g. tblAbsResidual
=OFFSET('ETM Cash Db and Regression'!$M$13,'ETM Cash Db and
Regression'!$Q$5,0,'ETM Cash Db and Regression'!$S$5-'ETM Cash Db and
Regression'!$Q$5,1)

Regards
Phil.

"Toppers" wrote:

Phil,
Works OK for me. Just check range name in A1 is correct as this
will give a #REF! error if incorrect.

"Philip J Smith" wrote:

When I use {=FREQUENCY(INDIRECT($A$1),Bin_Range)} I get a column of #REF!.

A1 can contain one of two valid range names.
The frequency function works when either of the two are entered directly or
even when an IF function replaces the INDIRECT function e.g.
{=FREQUENCY(IF($B$1=1,Range1,Range2),Bin_Range)}

In all cases the formulae are entered as array functions.

Does anyone know why it doesn't work?

Regards

Phil

  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 4,339
Default Why doesn't the INDIRECT function work when nested in FREQUENC

Phil,
It does appear from further testing that you DO get an error if
the range is dynamic i.e. use OFFSET function.

"Philip J Smith" wrote:

Hi.

I have checked that several times, copying from a list of range names
generated from Insert, Name, Paste, Paste List.

Does it matter that the ranges are variable length ranges determined by the
OFFSET function?

e.g. tblAbsResidual
=OFFSET('ETM Cash Db and Regression'!$M$13,'ETM Cash Db and
Regression'!$Q$5,0,'ETM Cash Db and Regression'!$S$5-'ETM Cash Db and
Regression'!$Q$5,1)

Regards
Phil.

"Toppers" wrote:

Phil,
Works OK for me. Just check range name in A1 is correct as this
will give a #REF! error if incorrect.

"Philip J Smith" wrote:

When I use {=FREQUENCY(INDIRECT($A$1),Bin_Range)} I get a column of #REF!.

A1 can contain one of two valid range names.
The frequency function works when either of the two are entered directly or
even when an IF function replaces the INDIRECT function e.g.
{=FREQUENCY(IF($B$1=1,Range1,Range2),Bin_Range)}

In all cases the formulae are entered as array functions.

Does anyone know why it doesn't work?

Regards

Phil



  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 80
Default Why doesn't the INDIRECT function work when nested in FREQUENC

Hi Ron.

No. The ranges are on the same worksheet as the Frequency analysis, thanks
for your response - please see my note about the named ranges being of
variable length using the offset function.

Regards

Phil

"Ron Rosenfeld" wrote:

On Fri, 23 Feb 2007 01:10:00 -0800, Philip J Smith
wrote:

When I use {=FREQUENCY(INDIRECT($A$1),Bin_Range)} I get a column of #REF!.

A1 can contain one of two valid range names.
The frequency function works when either of the two are entered directly or
even when an IF function replaces the INDIRECT function e.g.
{=FREQUENCY(IF($B$1=1,Range1,Range2),Bin_Range) }

In all cases the formulae are entered as array functions.

Does anyone know why it doesn't work?

Regards

Phil



It works OK here. Could it be that your range name is referring to a closed
workbook?
--ron

  #7   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 4,339
Default Why doesn't the INDIRECT function work when nested in FREQUENC

Sorry ... no idea.

(I did another test with MATCH and had the same problem which (perhaps?)
infers INDIRECT doesn't work with dynamic ranges.)

"Philip J Smith" wrote:

Thanks for the confirmation :-). Do you know if this is "fixed" in Excel 2007?

"Toppers" wrote:

Phil,
It does appear from further testing that you DO get an error if
the range is dynamic i.e. use OFFSET function.

"Philip J Smith" wrote:

Hi.

I have checked that several times, copying from a list of range names
generated from Insert, Name, Paste, Paste List.

Does it matter that the ranges are variable length ranges determined by the
OFFSET function?

e.g. tblAbsResidual
=OFFSET('ETM Cash Db and Regression'!$M$13,'ETM Cash Db and
Regression'!$Q$5,0,'ETM Cash Db and Regression'!$S$5-'ETM Cash Db and
Regression'!$Q$5,1)

Regards
Phil.

"Toppers" wrote:

Phil,
Works OK for me. Just check range name in A1 is correct as this
will give a #REF! error if incorrect.

"Philip J Smith" wrote:

When I use {=FREQUENCY(INDIRECT($A$1),Bin_Range)} I get a column of #REF!.

A1 can contain one of two valid range names.
The frequency function works when either of the two are entered directly or
even when an IF function replaces the INDIRECT function e.g.
{=FREQUENCY(IF($B$1=1,Range1,Range2),Bin_Range)}

In all cases the formulae are entered as array functions.

Does anyone know why it doesn't work?

Regards

Phil

  #8   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 4,339
Default Why doesn't the INDIRECT function work when nested in FREQUENCY?

Phil,
Works OK for me. Just check range name in A1 is correct as this
will give a #REF! error if incorrect.

"Philip J Smith" wrote:

When I use {=FREQUENCY(INDIRECT($A$1),Bin_Range)} I get a column of #REF!.

A1 can contain one of two valid range names.
The frequency function works when either of the two are entered directly or
even when an IF function replaces the INDIRECT function e.g.
{=FREQUENCY(IF($B$1=1,Range1,Range2),Bin_Range)}

In all cases the formulae are entered as array functions.

Does anyone know why it doesn't work?

Regards

Phil

  #9   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default Why doesn't the INDIRECT function work when nested in FREQUENC

A dynamic range is actually a named *formula* and gets evaluated by Indirect
as a *formula* and not a TEXT representation of a valid reference. That's
what causes the error.

There are other ways to do this, for example, using the CHOOSE function if
you have many ranges (but less than 29) but I'd need more info to make a
specific suggestion. If you only have a couple of ranges then your use of IF
should be ok:

=FREQUENCY(IF($B$1=1,Range1,Range2),Bin_Range)

Biff

"Toppers" wrote in message
...
Sorry ... no idea.

(I did another test with MATCH and had the same problem which (perhaps?)
infers INDIRECT doesn't work with dynamic ranges.)

"Philip J Smith" wrote:

Thanks for the confirmation :-). Do you know if this is "fixed" in Excel
2007?

"Toppers" wrote:

Phil,
It does appear from further testing that you DO get an error
if
the range is dynamic i.e. use OFFSET function.

"Philip J Smith" wrote:

Hi.

I have checked that several times, copying from a list of range names
generated from Insert, Name, Paste, Paste List.

Does it matter that the ranges are variable length ranges determined
by the
OFFSET function?

e.g. tblAbsResidual
=OFFSET('ETM Cash Db and Regression'!$M$13,'ETM Cash Db and
Regression'!$Q$5,0,'ETM Cash Db and Regression'!$S$5-'ETM Cash Db and
Regression'!$Q$5,1)

Regards
Phil.

"Toppers" wrote:

Phil,
Works OK for me. Just check range name in A1 is correct
as this
will give a #REF! error if incorrect.

"Philip J Smith" wrote:

When I use {=FREQUENCY(INDIRECT($A$1),Bin_Range)} I get a column
of #REF!.

A1 can contain one of two valid range names.
The frequency function works when either of the two are entered
directly or
even when an IF function replaces the INDIRECT function e.g.
{=FREQUENCY(IF($B$1=1,Range1,Range2),Bin_Range)}

In all cases the formulae are entered as array functions.

Does anyone know why it doesn't work?

Regards

Phil



  #10   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 80
Default Why doesn't the INDIRECT function work when nested in FREQUENC

Thanks for this. It makes sense now. The IF statement works well. I will
investigate the use of the choose statement, I hadn't thought of that.

Regards
Phil

"T. Valko" wrote:

A dynamic range is actually a named *formula* and gets evaluated by Indirect
as a *formula* and not a TEXT representation of a valid reference. That's
what causes the error.

There are other ways to do this, for example, using the CHOOSE function if
you have many ranges (but less than 29) but I'd need more info to make a
specific suggestion. If you only have a couple of ranges then your use of IF
should be ok:

=FREQUENCY(IF($B$1=1,Range1,Range2),Bin_Range)

Biff

"Toppers" wrote in message
...
Sorry ... no idea.

(I did another test with MATCH and had the same problem which (perhaps?)
infers INDIRECT doesn't work with dynamic ranges.)

"Philip J Smith" wrote:

Thanks for the confirmation :-). Do you know if this is "fixed" in Excel
2007?

"Toppers" wrote:

Phil,
It does appear from further testing that you DO get an error
if
the range is dynamic i.e. use OFFSET function.

"Philip J Smith" wrote:

Hi.

I have checked that several times, copying from a list of range names
generated from Insert, Name, Paste, Paste List.

Does it matter that the ranges are variable length ranges determined
by the
OFFSET function?

e.g. tblAbsResidual
=OFFSET('ETM Cash Db and Regression'!$M$13,'ETM Cash Db and
Regression'!$Q$5,0,'ETM Cash Db and Regression'!$S$5-'ETM Cash Db and
Regression'!$Q$5,1)

Regards
Phil.

"Toppers" wrote:

Phil,
Works OK for me. Just check range name in A1 is correct
as this
will give a #REF! error if incorrect.

"Philip J Smith" wrote:

When I use {=FREQUENCY(INDIRECT($A$1),Bin_Range)} I get a column
of #REF!.

A1 can contain one of two valid range names.
The frequency function works when either of the two are entered
directly or
even when an IF function replaces the INDIRECT function e.g.
{=FREQUENCY(IF($B$1=1,Range1,Range2),Bin_Range)}

In all cases the formulae are entered as array functions.

Does anyone know why it doesn't work?

Regards

Phil






  #11   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default Why doesn't the INDIRECT function work when nested in FREQUENC

You're welcome. Thanks for the feedback!

Biff

"Philip J Smith" wrote in message
...
Thanks for this. It makes sense now. The IF statement works well. I
will
investigate the use of the choose statement, I hadn't thought of that.

Regards
Phil

"T. Valko" wrote:

A dynamic range is actually a named *formula* and gets evaluated by
Indirect
as a *formula* and not a TEXT representation of a valid reference. That's
what causes the error.

There are other ways to do this, for example, using the CHOOSE function
if
you have many ranges (but less than 29) but I'd need more info to make a
specific suggestion. If you only have a couple of ranges then your use of
IF
should be ok:

=FREQUENCY(IF($B$1=1,Range1,Range2),Bin_Range)

Biff

"Toppers" wrote in message
...
Sorry ... no idea.

(I did another test with MATCH and had the same problem which
(perhaps?)
infers INDIRECT doesn't work with dynamic ranges.)

"Philip J Smith" wrote:

Thanks for the confirmation :-). Do you know if this is "fixed" in
Excel
2007?

"Toppers" wrote:

Phil,
It does appear from further testing that you DO get an
error
if
the range is dynamic i.e. use OFFSET function.

"Philip J Smith" wrote:

Hi.

I have checked that several times, copying from a list of range
names
generated from Insert, Name, Paste, Paste List.

Does it matter that the ranges are variable length ranges
determined
by the
OFFSET function?

e.g. tblAbsResidual
=OFFSET('ETM Cash Db and Regression'!$M$13,'ETM Cash Db and
Regression'!$Q$5,0,'ETM Cash Db and Regression'!$S$5-'ETM Cash Db
and
Regression'!$Q$5,1)

Regards
Phil.

"Toppers" wrote:

Phil,
Works OK for me. Just check range name in A1 is
correct
as this
will give a #REF! error if incorrect.

"Philip J Smith" wrote:

When I use {=FREQUENCY(INDIRECT($A$1),Bin_Range)} I get a
column
of #REF!.

A1 can contain one of two valid range names.
The frequency function works when either of the two are
entered
directly or
even when an IF function replaces the INDIRECT function e.g.
{=FREQUENCY(IF($B$1=1,Range1,Range2),Bin_Range)}

In all cases the formulae are entered as array functions.

Does anyone know why it doesn't work?

Regards

Phil






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
Thinking that indirect should work Brad Excel Discussion (Misc queries) 0 October 24th 06 04:16 PM
Indirect - Why does it seem to only work sometimes? [email protected] Excel Worksheet Functions 7 June 21st 06 04:51 AM
INDIRECT function do not work when other file is closed starguy Excel Discussion (Misc queries) 4 May 12th 06 06:57 PM
nested Indirect to other WS LyleF Excel Worksheet Functions 4 August 3rd 05 04:11 PM
Does file need to be open for INDIRECT to another workbook to work briancrosier Excel Discussion (Misc queries) 2 December 15th 04 04:25 PM


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