How to use multiple criteria with COUNTIF?

1

INPUT:

enter image description here

This is the format of the OUTPUT desired:

enter image description here

OUTPUT for example INPUT:

enter image description here

The problem is, I don't know how to use COUNTIF with several criteria.

The "dream function" [that doesn't work] would look like this in cell D3:

=(COUNTIF($M$2:$M$65535;boy) AND (COUNTIF($N$2:$N$65535;">0")-COUNTIF($N$2:$N$65535;">4")) AND (COUNTIF($O$2:$O$65535;WILMS))

Any ideas?

LanceBaynes

Posted 2012-01-11T10:30:29.447

Reputation: 3 510

1use the COUNTIFS formula in Excel 2007. In prior versions, you will have to use an array formula – JMax – 2012-01-11T10:56:38.580

It appears there are multiple values in some cells of column N. The formula is not going to be able to see them as separate values, therefore will not see 0,4 as 0 and 4. These need to be in there own rows/cells. – CharlieRB – 2012-01-11T14:52:56.617

2Is that not continental notation for 3.4 ? Here in Spain the , and . are transposed. 1.000,2 is just over a thousand. – BrianA – 2012-01-11T15:59:31.687

Did you make it work with SUMPRODUCT lance? – barry houdini – 2012-01-17T17:32:41.687

Answers

1

Add a column that classifies by range (say P2=IF(N2>=9,"R4",IF(N2>4,"R3",IF(N2>1,"R2","R1"))) & copy down) then use a pivot table. With some appearance modification (and using Excel 2007) the result seems close enough to serve:

Pivot table example

pnuts

Posted 2012-01-11T10:30:29.447

Reputation: 5 716