Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
kayard
 
Posts: n/a
Default strange behaviour with matrix formulas


Hi,

I'm slightly puzzled.

Can anybody explain me why the following formula works as expected
(returns 320) :

=SUMPRODUCT(INDEX(Sheet2!B2:D6;C6;0);INDEX(sheet3! B2:D6;C6;0))

BUT, if I put in cell H1 (for example)

INDEX(Sheet2!B2:D6;C6;0) and

INDEX(sheet3!B2:D6;C6;0) in H2

and then

SUMPRODUCT( H1;2) this doesn't work as expected ?

NB: I paid attention to enter formula in H1 and H2 as matrix (CTRL +
SHIFT + ENTER) ...

Any guess ?


--
kayard
------------------------------------------------------------------------
kayard's Profile: http://www.excelforum.com/member.php...o&userid=24716
View this thread: http://www.excelforum.com/showthread...hreadid=542448

  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Miguel Zapico
 
Posts: n/a
Default strange behaviour with matrix formulas

From my understanding, when you enter a formula that returns an array in a
single cell, it will return the first element of the array. The formula
SUMPRODUCT expects arrays, and in the first case the INDEX formulae are
giving two arrays if the formula is enter as an array formula, while the
second case it is just getting two scalars from the cells H1 and H2.

Hope this helps,
Miguel.

"kayard" wrote:


Hi,

I'm slightly puzzled.

Can anybody explain me why the following formula works as expected
(returns 320) :

=SUMPRODUCT(INDEX(Sheet2!B2:D6;C6;0);INDEX(sheet3! B2:D6;C6;0))

BUT, if I put in cell H1 (for example)

INDEX(Sheet2!B2:D6;C6;0) and

INDEX(sheet3!B2:D6;C6;0) in H2

and then

SUMPRODUCT( H1;2) this doesn't work as expected ?

NB: I paid attention to enter formula in H1 and H2 as matrix (CTRL +
SHIFT + ENTER) ...

Any guess ?


--
kayard
------------------------------------------------------------------------
kayard's Profile: http://www.excelforum.com/member.php...o&userid=24716
View this thread: http://www.excelforum.com/showthread...hreadid=542448


  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
kayard
 
Posts: n/a
Default strange behaviour with matrix formulas


Yes but I entered the formulas in h1 and h2 as array formulas so there
shouldn't be any difference..


--
kayard
------------------------------------------------------------------------
kayard's Profile: http://www.excelforum.com/member.php...o&userid=24716
View this thread: http://www.excelforum.com/showthread...hreadid=542448

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Miguel Zapico
 
Posts: n/a
Default strange behaviour with matrix formulas

The difference is that a cell cannot contain an array, just an element of the
array. If you enter a formula like
={1,2,3}
in a cell, even if you enter it as an array formula, it will show the
element 1, and behave as the element 1 (scalar), not as the whole array.

Miguel.

"kayard" wrote:


Yes but I entered the formulas in h1 and h2 as array formulas so there
shouldn't be any difference..


--
kayard
------------------------------------------------------------------------
kayard's Profile: http://www.excelforum.com/member.php...o&userid=24716
View this thread: http://www.excelforum.com/showthread...hreadid=542448


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
Strange behaviour when sorting rows Paul Moore Excel Discussion (Misc queries) 1 February 23rd 06 11:23 PM
Unexpected (?) behaviour of OFFSET() in array formulas vezerid Excel Discussion (Misc queries) 11 December 13th 05 08:29 PM
Strange "FormatCells" behaviour Mike Hyndman Excel Worksheet Functions 0 October 23rd 05 05:30 PM
Help, Urgent Excel Formulas are not calculating maashoff Excel Discussion (Misc queries) 1 May 3rd 05 12:25 AM
Strange behaviour Edgar Thoemmes Excel Worksheet Functions 1 February 8th 05 03:20 PM


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