# Thread: Counting Formula Results (2003 2007)

1. ## Counting Formula Results (2003 2007)

I have a formula
=IF(AND(\$H11>0,\$H11<10),"True","False")
This returns a result of True or False based on the value in a cell.
This formula fills down a column. It works fine.
Now I need to count, with a separate formula, the number of "True" values returned.
I tried =COUNTIF(S11:S339,"=TRUE") =COUNTIF(S11:S339,="TRUE") =COUNTIF(S11:S339,"TRUE") =COUNTIF(S11:S339,TRUE)
None of which work, What am I doing wrong???
thanks

2. ## Re: Counting Formula Results (2003 2007)

Assuming that you entered the formulas in S11:S339, the formula
<code>
=COUNTIF(S11:S339,"True")
</code>
should work. In what way does it fail?

I would simplify the formula in S11 to
<code>
=AND(H11>0,H11<10)
</code>
and fill down to S339. You should then be able to use
<code>
=COUNTIF(S11:S339,TRUE)
</code>
(no quotes around TRUE)

3. ## Re: Counting Formula Results (2003 2007)

If you would like to omit the column of intermediary results S11:S339, you can use this formula to count the number of entries in H11:H339 that are greater than 0 and smaller than 10:
<code>
=SUMPRODUCT((H11:H339>0)*(H11:H339<10))</code>

4. ## Re: Counting Formula Results (2003 2007)

The formula failed by returning a zero.
As a quick fix I changed the values from True and False to 1 and 0 then the formula was able to count properly

thanks a lot for your help

5. ## Re: Counting Formula Results (2003 2007)

That "=sumproduct" formula is the real ticket, thanks again!!

#### Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts
•