# Excel 2007 function CountIf

1. ## Excel 2007 function CountIf

I would like to know whether there is a possibility of using other functions in the search criteria argument of the CountIf Function that also refer to the cells in the domain to which CountIf is applied.
The same question arises when using for example SumIf Function.

Thanks a lot for your help

Kind regards
My Computer  Quote

2. SUMPRODUCT is usually used to substitute a combination of SUMIF and COUNTIF. What exactly are you trying to determine in Excel? Can you upload an example spreadsheet?

http://www.xldynamic.com/source/xld.SUMPRODUCT.html
My Computer  Quote

3. ## To Golden in connexion with CountIf

Thank you very much for the link referring to "sumproduct". Since momentarily I have no much free time left, it will take a few days until I can read through it.

I would like to do the following:

Lets assume there is a column of numbers and one would like to count how many of them can be divided by a given number e.g. 3.

The condition to be checked could be something like: number/3-round(number/3;0) = 0

Now, what I would like to know is if such an expression can be directly combined with the countIf function (without introducing "artificial" columns), something like

CountIf(A1:A1000; number in each cell/3-round(number in each cell/3;0) = 0)

I hope my question is not too idiotic.
My Computer  Quote

4. Try This

{=COUNT(A1:A1000)-COUNT(IF(MOD(A1:A1000,3),A1:A1000))}

Don't type the curly braces, they will be added automatically

This is an array formula so you have to press CTRL-SHIFT-ENTER at the end of the formula

hth
My Computer  Quote

Related Discussions
Our Sites