Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
 
Posts: n/a
Default Indirect Function Doesn't like non-contiguous ranges

I was trying to use the indirect command to sum a named
range of cells. If I enter the following in a cell then
the formula works if the text in the cell refers to a
contiguous range. If I change the range to be non-
contiguous, it gives a #ref error in the cell.
Cell contents
=+SUM(INDIRECT(I66))
I66 has the string "rng1" which is a named range on the
current worksheet.
Does anyone have any idea of any work around?
  #2   Report Post  
 
Posts: n/a
Default

Please study CHOOSE function. Regards.

  #4   Report Post  
 
Posts: n/a
Default


-----Original Message-----
Please study CHOOSE function. Regards.

THanks, I looked at Choose function and it allows me to
choose from a list that has set range names, but it
doesn't let me use another cell for the range name as can
be done with indirect (except for non-contiguous ranges).
Any one have another ideal.
  #5   Report Post  
Domenic
 
Posts: n/a
Default

I'm not sure if this will help, but assuming that your range of
non-contiguous cells are A1, B4:B6, and C7:C12, try...

=SUMPRODUCT(SUMIF(INDIRECT(E1:E3),"<"))

....where E1:E3 contains the following references:

E1: A1
E2: B4:B6
E3: C7:C12

Hope this helps!

In article ,
wrote:

I was trying to use the indirect command to sum a named
range of cells. If I enter the following in a cell then
the formula works if the text in the cell refers to a
contiguous range. If I change the range to be non-
contiguous, it gives a #ref error in the cell.
Cell contents
=+SUM(INDIRECT(I66))
I66 has the string "rng1" which is a named range on the
current worksheet.
Does anyone have any idea of any work around?



  #6   Report Post  
Mel
 
Posts: n/a
Default

Thanks for all replies. You all have confirmed that the
indirect function won't operate on non-contiguous ranges.
Don, you are correct that entering the range directly
will work, but that prevents me from doing string math to
create the range names that I want. Sometimes we just
want to do more than the program will do. Thanks again
for your time. At least I know I hit a dead end.
-----Original Message-----
I don't think you can use indirect for this
=sum(rng1) will work

--
Don Guillett
SalesAid Software

wrote in message
...
I was trying to use the indirect command to sum a named
range of cells. If I enter the following in a cell then
the formula works if the text in the cell refers to a
contiguous range. If I change the range to be non-
contiguous, it gives a #ref error in the cell.
Cell contents
=+SUM(INDIRECT(I66))
I66 has the string "rng1" which is a named range on the
current worksheet.
Does anyone have any idea of any work around?



.

  #8   Report Post  
Junior Member
 
Posts: 1
Default

Any would have a solution to suggest? I am encountering the same issue... INDIRECT with non continous range... I am stuck there.
Is it considered as a bug or a limitation of Excel? I don't understand.
Anyway, Excel 2003, 2007 and 2010 have same behavior...
Thanks in advance,
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 worksheet function in excel richard_annor Excel Worksheet Functions 1 March 6th 05 11:10 PM
INDIRECT function error Anthony Slater Excel Discussion (Misc queries) 3 February 21st 05 06:26 PM
INDIRECT function question Joe Excel Worksheet Functions 1 February 14th 05 03:54 PM
Indirect( ) function loosing values when spreadsheets are closed Word4Dummies Excel Worksheet Functions 2 February 13th 05 12:41 PM
Offset, indirect, match function limitation on linked worksheets. NewAlgier Excel Worksheet Functions 1 December 6th 04 11:55 PM


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