Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
hmm hmm is offline
external usenet poster
 
Posts: 175
Default INDIRECT.EXT with vector reference

INDIRECT.EXT, from Laurent Longre's Morefunc 4.2 Add-in, is giving me a
"#VALUE!" error message in the cell with the formula:

=SUM(INDIRECT.EXT("[MyBook.xls]MySheet!$A$1:$A$3"))

when MyBook.xls is closed; it only works when I open MyBook.xls.

From what I've seen in the help file and other posts in this forum, it is
supposed to work for closed workbooks and for ranges of cells.

How can I get it to work? Perhaps there is an update, or a way of using
this function that I'm not aware of?

Thanks.
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 5,651
Default INDIRECT.EXT with vector reference

On Sun, 17 Dec 2006 06:37:00 -0800, hmm wrote:

INDIRECT.EXT, from Laurent Longre's Morefunc 4.2 Add-in, is giving me a
"#VALUE!" error message in the cell with the formula:

=SUM(INDIRECT.EXT("[MyBook.xls]MySheet!$A$1:$A$3"))

when MyBook.xls is closed; it only works when I open MyBook.xls.

From what I've seen in the help file and other posts in this forum, it is
supposed to work for closed workbooks and for ranges of cells.

How can I get it to work? Perhaps there is an update, or a way of using
this function that I'm not aware of?

Thanks.


I believe the problem is your syntax. You included the function required
double quotes, but omitted the "single quotes" that are part of the Excel
required naming convention.

=SUM(INDIRECT.EXT("'[MyBook.xls]MySheet'!$A$1:$A$3"))

Also, although you did not mention it one way or the other, I believe the
formula you posted will execute faster as an array formula.


--ron
  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
hmm hmm is offline
external usenet poster
 
Posts: 175
Default INDIRECT.EXT with vector reference

Thanks Ron.

I tried again, this time checking carefully all quotes.

Suppose cells A1 through A10 the numbers 1 to 10.

The formula =SUM(INDIRECT.EXT("'C:\[MyBook.xls]MySheet'!$A$1:$A$10"))
will indeed return the sum of all 10 cells (55), even when MyBook.xls is
closed.

However, suppose I only want a subrange of 3 cells beginning with A2. The
formula

=SUM(OFFSET(INDIRECT.EXT("'C:\[MyBook.xls]MySheet'!$A$1:$A$10"),1,0,3))

only works (gives the correct result of 9) when MyBook.xls is open. When
MyBook.xls is closed, I get the "#VALUE!" error

(Since the limits are calculated in another formula, it is not possible to
enter the subrange explicitly as "A2:A4".)

Any other ideas?

"Ron Rosenfeld" wrote:

On Sun, 17 Dec 2006 06:37:00 -0800, hmm wrote:

INDIRECT.EXT, from Laurent Longre's Morefunc 4.2 Add-in, is giving me a
"#VALUE!" error message in the cell with the formula:

=SUM(INDIRECT.EXT("[MyBook.xls]MySheet!$A$1:$A$3"))

when MyBook.xls is closed; it only works when I open MyBook.xls.

From what I've seen in the help file and other posts in this forum, it is
supposed to work for closed workbooks and for ranges of cells.

How can I get it to work? Perhaps there is an update, or a way of using
this function that I'm not aware of?

Thanks.


I believe the problem is your syntax. You included the function required
double quotes, but omitted the "single quotes" that are part of the Excel
required naming convention.

=SUM(INDIRECT.EXT("'[MyBook.xls]MySheet'!$A$1:$A$3"))

Also, although you did not mention it one way or the other, I believe the
formula you posted will execute faster as an array formula.


--ron

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 5,651
Default INDIRECT.EXT with vector reference

On Sun, 17 Dec 2006 08:29:00 -0800, hmm wrote:

Thanks Ron.

I tried again, this time checking carefully all quotes.

Suppose cells A1 through A10 the numbers 1 to 10.

The formula =SUM(INDIRECT.EXT("'C:\[MyBook.xls]MySheet'!$A$1:$A$10"))
will indeed return the sum of all 10 cells (55), even when MyBook.xls is
closed.

However, suppose I only want a subrange of 3 cells beginning with A2. The
formula

=SUM(OFFSET(INDIRECT.EXT("'C:\[MyBook.xls]MySheet'!$A$1:$A$10"),1,0,3))

only works (gives the correct result of 9) when MyBook.xls is open. When
MyBook.xls is closed, I get the "#VALUE!" error

(Since the limits are calculated in another formula, it is not possible to
enter the subrange explicitly as "A2:A4".)

Any other ideas?


Well, the problem seems to be that, when the workbook is closed, INDIRECT.EXT
(as described in the HELP section), returns the "VALUES" of those cells. These
values are returned as an array.

The OFFSET function, on the other hand, requires that the first argument be a
cell reference, not an array of values. Hence the VALUE error.

It is interesting that if the workbook is open, INDIRECT.EXT returns the cell
reference.


--ron
  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
hmm hmm is offline
external usenet poster
 
Posts: 175
Default INDIRECT.EXT with vector reference

Thanks, Ron, for all your great help.

If you (or anyone else) has any other ideas how to achieve the same result,
I welcome them.

"Ron Rosenfeld" wrote:

On Sun, 17 Dec 2006 08:29:00 -0800, hmm wrote:

Thanks Ron.

I tried again, this time checking carefully all quotes.

Suppose cells A1 through A10 the numbers 1 to 10.

The formula =SUM(INDIRECT.EXT("'C:\[MyBook.xls]MySheet'!$A$1:$A$10"))
will indeed return the sum of all 10 cells (55), even when MyBook.xls is
closed.

However, suppose I only want a subrange of 3 cells beginning with A2. The
formula

=SUM(OFFSET(INDIRECT.EXT("'C:\[MyBook.xls]MySheet'!$A$1:$A$10"),1,0,3))

only works (gives the correct result of 9) when MyBook.xls is open. When
MyBook.xls is closed, I get the "#VALUE!" error

(Since the limits are calculated in another formula, it is not possible to
enter the subrange explicitly as "A2:A4".)

Any other ideas?


Well, the problem seems to be that, when the workbook is closed, INDIRECT.EXT
(as described in the HELP section), returns the "VALUES" of those cells. These
values are returned as an array.

The OFFSET function, on the other hand, requires that the first argument be a
cell reference, not an array of values. Hence the VALUE error.

It is interesting that if the workbook is open, INDIRECT.EXT returns the cell
reference.


--ron



  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 5,651
Default INDIRECT.EXT with vector reference

On Mon, 18 Dec 2006 00:06:01 -0800, hmm wrote:

Thanks, Ron, for all your great help.

If you (or anyone else) has any other ideas how to achieve the same result,
I welcome them.


The problem, if I understand what you are doing, is to return an array of
values from an array of values.

One way to do that would be with the LOOKUP function.

In your case, assume the text form of the address is in A1.

=INDIRECT.EXT(A1) would then return an array containing the values in the range
specified.

Let us say you want to sum the 2nd, 3rd and 4th items in that array.

A formula of the sort:

=SUM(LOOKUP({2,3,4},ROW(INDIRECT("1:"&
COUNT(INDIRECT.EXT(A1)))),INDIRECT.EXT(A1)))

would sum the 2nd, 3rd and 4th items returned by INDIRECT.EXT(a1).

This is the vector form of the LOOKUP function.

I believe it can be entered either normally or as an array formula. For speed,
Longre advises using the array method of entry.

Without knowing more about your specifications, it's hard to advise you how to
compute the array {2,3,4}, but some variant of the ROW(INDIRECT(...)) method
should work. e.g. =ROW(INDIRECT(start & num_of_entries)) instead of the
computation you are using for the OFFSET function.

There may be simpler methods of doing this. I have not searched the NG for it,
though.
--ron
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.EXT reference pdabill Excel Discussion (Misc queries) 1 August 25th 06 12:28 AM
INDIRECT.EXT Help Required Mike McLellan Excel Worksheet Functions 6 July 19th 06 01:59 PM
Error using Excel add-in with INDIRECT.EXT function Barb Reinhardt Excel Discussion (Misc queries) 3 October 6th 05 04:54 PM
INDIRECT.EXT help needed SU Excel Worksheet Functions 2 August 1st 05 12:29 PM
INDIRECT.EXT question SU Excel Worksheet Functions 8 April 12th 05 07:57 PM


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