LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.misc
vezerid
 
Posts: n/a
Default INDIRECT - Strange behavior

Hi everybody,

once more INDIRECT is producing a behavior I cannot decipher. Problem:

Cells A1:A18 contain various numbers, some of which are 0. A1 is always
a non-zero number. Consecutive zeros are not expected.

In B2:B17 I want a formula, which will produce the sum, next to each 0,
of the numbers since the last 0. This is an older question in the
group, for which Bob Phillips had supplied a solution, involving two
columns. I was trying to see if I can do it in one column. Here is what
I have in B2: (array formula)

{=IF(A2=0,SUM(N(INDIRECT("A"&MAX(1,ROW($A$1:A1)*($ A$1:A1=0))&":A"&ROW()))),"")}

This formula produces 1 for the first sum and 0 for all other sums. I
would understand it better if it produced #VALUE! instead.

When I extract the argument to INDIRECT and enter it as a separate
formula in C2,

{="A"&MAX(1,ROW($A$1:A1)*($A$1:A1=0))&":A"&ROW() }

Then the formula in D2 works properly:

=IF(A2=0,SUM(INDIRECT(C2)),"")

Why is this happening? INDIRECT often behaves strangely and I have not
yet found a consistent framework for when it does and when not, despite
various discussions in the NG. Can you enlighten please?

TIA

Kostis Vezerides

 
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
Strange (?) Evaluate Method Behavior Johnny Meredith Excel Worksheet Functions 0 March 3rd 06 02:28 PM
Strange paste selection behavior 1scant Excel Discussion (Misc queries) 1 March 2nd 06 09:58 PM
Strange behavior in INDEX(..., MIN(...)) - array formula vezerid Excel Discussion (Misc queries) 2 February 21st 06 11:56 AM
Excel Mac OS X - Strange Behavior BrianP Excel Discussion (Misc queries) 0 January 1st 06 08:07 AM
Strange behavior w/ Text, Button, & Check Boxes kswinth Excel Discussion (Misc queries) 0 June 26th 05 04:49 PM


All times are GMT +1. The time now is 09:28 AM.

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"