View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.misc
Stu[_2_] Stu[_2_] is offline
external usenet poster
 
Posts: 4
Default Counting Cells by colour with an array formula

Hi

I have a formula checking several criteria and giving me a count of
items that satisfy these criteria. This is the formula and has been
entered as an array formula.

=SUM(('Summary TFX'!$I$5:$I$540="SMAT")*('Summary TFX'!$E$5:$E$540=
(YEAR($B$2)))*('Summary TFX'!$C$5:$C$540=(WEEKNUM($B$2))))

this works fine but what I want to do is add another parameter to also
check for the interior colour of the cell. I've added a function -
cellcolourindex - which returns the interior colour but can't get this
to work in the formula. the new formula (which returns #VALUE) is
here and the formula auditing tool shows it failing when evaluating
the collcolour index section but Im unsure why. (this has also been
entered as an array formula)

=SUM((cellcolourindex('Summary TFX'!$I$5:$I$540)=4)*('Summary TFX'!$I
$5:$I$540="SMAT")*('Summary TFX'!$E$5:$E$540=(YEAR($B$2)))*('Summary
TFX'!$C$5:$C$540=(WEEKNUM($B$2))))

Is it possible to use functions within array formulae? If so can
anyone give me any clues as to why mine doesn't work?

TIA

Stu