F
fatcatfan
I'm trying to use an array formula SUM with nested IFs to accomplish
some complex conditional sums. If I use "COUNT" as the outermost
function I get a number that appears to be correctly counting the
target cells. I've added a nested "IF(ISNUMBER(range))" to the count
function and verified that it returns the same number as the function
without it, so it would seem all the selected cells are, in fact,
numbers. I've even calculated a separate array formula of =AND(ISNUMBER
(range)) which returns TRUE, again to confirm all the cells in the
range contain numbers. However, as soon as I change the formula from
"COUNT" to "SUM" I get a #VALUE error. Any clue why?
The formula:
{=COUNT(IF(INT(VALUE(LEFT('1997'!$A$2:$A$1033,19))-5/24)=DATE(C
$2,$A3,$B3),IF(VALUE(LEFT('1997'!$C$1:$EC$1,2))=$A$1,IF('1997'!$C$2:$EC
$1033>0,'1997'!$C$2:$EC$1033))))}
this returns "9" but changing COUNT to SUM returns #VALUE
some complex conditional sums. If I use "COUNT" as the outermost
function I get a number that appears to be correctly counting the
target cells. I've added a nested "IF(ISNUMBER(range))" to the count
function and verified that it returns the same number as the function
without it, so it would seem all the selected cells are, in fact,
numbers. I've even calculated a separate array formula of =AND(ISNUMBER
(range)) which returns TRUE, again to confirm all the cells in the
range contain numbers. However, as soon as I change the formula from
"COUNT" to "SUM" I get a #VALUE error. Any clue why?
The formula:
{=COUNT(IF(INT(VALUE(LEFT('1997'!$A$2:$A$1033,19))-5/24)=DATE(C
$2,$A3,$B3),IF(VALUE(LEFT('1997'!$C$1:$EC$1,2))=$A$1,IF('1997'!$C$2:$EC
$1033>0,'1997'!$C$2:$EC$1033))))}
this returns "9" but changing COUNT to SUM returns #VALUE