Testing same cell across multiple sheets for a string and counting each instance?
On Mar 7, 11:44 pm, "T. Valko" wrote:
Try using wildcards:
=IF(ISTEXT(A253),SUMPRODUCT(COUNTIF(INDIRECT("'"&$ O
$6&ROW(INDIRECT("1:65"))&"'!I28"),"*"&A253&"*"))," ")
Biff
Okay so one last question. Is there a way to reconcile this wild-card
approach with my original approach?
What I'm finding is that if I put in the wild-card version in places
where I don't have multiple entries to test for (say spots where I'm
testibg for one entry that matches the option) it comes up with a "0"
even when valid entries are there.... The following are the two
versions and where they work:
single only =IF(ISTEXT(A237),SUMPRODUCT(COUNTIF(INDIRECT("'"&$ O
$6&""&ROW(INDIRECT("1:65"))&"'!I27"),A237)),"")
multiple only =IF(ISTEXT(A253),SUMPRODUCT(COUNTIF(INDIRECT("'"&$ O
$6&ROW(INDIRECT("1:65"))&"'!I28"),"*"&A253&"*"))," ")
To clarify, single would be a cell with "x" where you are testing for
"x". Multiple would be a cell with "x, y, c" where you are testing
for "y".
The wierdest thing is that the wildcard DOES work in another context
that is "intra-page" in nature (does not test between pages, but runs
across a column in the page... the aggregation is already done to the
page level. Below is the routine that does work.
=IF(ISTEXT(A78),COUNTIF($I$8:$I$73,"*"&A78&"*"),"" )
Very strange... any help is appreciated.
Thanks,
Rick
|