Sumproduct(match range of values in 2+ cols)
Tou're just missing some parenthesis.
This should work:
=SUMPRODUCT(--(ISNUMBER(MATCH('Year 3 Raw
Data'!$Q$2:$Q$2502,{1,4,5,6,7,8,10,11,12,14},0))),--(ISNUMBER(MATCH('Year 3
Raw
Data'!$S$2:$S$2502,{1,4,5,6,7,8,10,11,12,14},0))),--('Year 3 Raw
Data'!$U$2:$U$2502=0),--('Year 3 Raw Data'!$W$2:$W$2502=0))
Note that empty cells evaluate as 0 so those last 2 tests:
$U$2:$U$2502=0
$W$2:$W$2502=0
May have to be rewritten if there are empty cells to account for.
You can shorten the formula a bit by creating the defined name:
InsertNameDefine
Name: Array
Refers to: ={1,4,5,6,7,8,10,11,12,14}
Then:
=SUMPRODUCT(--(ISNUMBER(MATCH('Year 3 Raw
Data'!$Q$2:$Q$2502,Array,0))),--(ISNUMBER(MATCH('Year 3 Raw
Data'!$S$2:$S$2502,Array,0))),--('Year 3 Raw Data'!$U$2:$U$2502=0),--('Year
3 Raw Data'!$W$2:$W$2502=0))
--
Biff
Microsoft Excel MVP
"LisaM" wrote in message
...
Hi,
I'm trying to create a sumproduct function to look for a range of values
in
two different cells as follows:
=SUMPRODUCT(--ISNUMBER(MATCH('Year 3 Raw
Data'!$Q$2:$Q$2502,{1,4,5,6,7,8,10,11,12,14},0)),--ISNUMBER(MATCH('Year 3
Raw
Data'!$S$2:$S$2502,{1,4,5,6,7,8,10,11,12,14},0)),--('Year 3 Raw
Data'!$U$2:$U$2502=0),--('Year 3 Raw Data'!$W$2:$W$2502=0))
Unfortunately this is not returning the correct answer (which someone I
work
with was able to calculate using a statistical application).
If someone could let me know where my function is problematic I would be
very grateful. It appears to work if I use only one ISNUMBER(MATCH
argument,
not with two or more.
Thank you.
Kind regards,
LisaM
|