Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Henrik
 
Posts: n/a
Default SUMPRODUCT as array formula?

Hi,

Does anyone know if SUMPRODUCT can be used as an array formula?
If this is the case, what is the syntax and can the syntax include conditions?

If it works, I would imagine that the syntax looks something like this:

{=SUMPRODUCT(IF(logical_tests,value_if_true,""),IF (logical_tests_value_if_true,""))}

However, if SUMPRODUCT doesn't work like an array formula, I don't want to
waste time trying to figure it out. Please let me know if you have any
experience with this.

Thanks,
Henrik

  #2   Report Post  
DOR
 
Posts: n/a
Default SUMPRODUCT as array formula?

see

http://tinyurl.com/7sqmu

  #3   Report Post  
Aladin Akyurek
 
Posts: n/a
Default SUMPRODUCT as array formula?

Henrik wrote:
Hi,

Does anyone know if SUMPRODUCT can be used as an array formula?
If this is the case, what is the syntax and can the syntax include conditions?


SumProduct always operates on (computed) arrays. That is the reason why
there is ordinarily no need to confirm SumProduct formulas with
control+shift+enter as you would the formulas which are often referred
to as array formulas.


If it works, I would imagine that the syntax looks something like this:

{=SUMPRODUCT(IF(logical_tests,value_if_true,""),IF (logical_tests_value_if_true,""))}


When an IF() function call is a part of a formula and it must return a
computed array, the formula it's part of must be confirmed with
control+shift+enter, even when wrapped inside the SumProduct function.

Suppose we have:

FL Yes
FL Yes
FL No
GA Yes
GA No
LA No
MD Yes

in A2:B8 and we want to count records consisting of "FL" and "Yes".

Required counting can be effected in a number of ways. Restricting the
choice set to setups in terms of a single formula, we can have:

1.

{=SUM(IF(A2:A8="FL",IF(B2:B8="Yes",1,0)))}

2.

{=COUNT(IF(A2:A8="FL",IF(B2:B8="Yes",1)))}

3.

=SUMPRODUCT(--(A2:A8="FL"),--(B2:B8="Yes"))

4.

=DCOUNTA(A1:B8,1,L1:M2)

where A1:B1 houses labels and L1:M2 the appropriate criteria.

5. The following formula

{=SUMPRODUCT(IF(A2:A8="FL",IF(B2:B8="Yes",1,0)))}

would also work as intended. However, the issue is whether one would
want opt for (5) when (3) is available. When an array returning IF()
call cannot be eliminated, it's better (an elegant action indeed) not to
wrap such a call into a SumProduct and invoke instead an "array
formula", that is, a formula that must be confirmed with
control+shift+enter.

[...]

--

[1] The SumProduct function should implicitly coerce the truth values to
their Excel numeric equivalents.
[2] The lookup functions should have an optional argument for the return
value, defaulting to #N/A in its absence.
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
customise array formula output TUNGANA KURMA RAJU Excel Discussion (Misc queries) 0 October 25th 05 05:15 AM
Editing Array Formula [email protected] Excel Worksheet Functions 7 August 28th 05 06:46 AM
How can I use a cell reference in Sumproduct array formula? Chrism Excel Discussion (Misc queries) 1 April 7th 05 05:05 PM
Array Formula frankybenali Excel Worksheet Functions 1 February 16th 05 06:37 PM
Array Formula Doug at HAL Excel Worksheet Functions 3 December 21st 04 10:27 AM


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