# nested count if statement

#### organicjan

##### New Member
I need to nest a count if statement to add three criteria. The orignial is +COUNTIF(C3:C70,"=W") and I need to add to that count if the range =C and count if the range =E.

### Excel Facts

Difference between two dates
Secret function! Use =DATEDIF(A2,B2,"Y")&" years"&=DATEDIF(A2,B2,"YM")&" months"&=DATEDIF(A2,B2,"MD")&" days"

#### Cam

##### Board Regular
Give this a try.

=COUNTIF(A1:A10,"C")+ COUNTIF(A1:A10,"E")+COUNTIF(A1:A10,"W")

##### MrExcel MVP
On 2002-08-28 12:22, organicjan wrote:
I need to nest a count if statement to add three criteria. The orignial is +COUNTIF(C3:C70,"=W") and I need to add to that count if the range =C and count if the range =E.

Also

=SUMPRODUCT((A1:A10={"C","E","W"})+0)

If you insert a row before your data and enter a label in A1, say, "field", you can also set up a criteria range in order to use DCOUNTA:

In C1:C4 enter:

{"field";"c";"e";"w"}

In C5 enter:

=DCOUNTA(A1:A11,1,C1:C4)

See the figure...
Book9
ABCD
1fieldfield
2qc
3we
4ew
5x3
6c3
7f
8g
9h
10I
11q
Sheet1

Replies
1
Views
430
Replies
9
Views
232
Replies
5
Views
216
Replies
3
Views
228
Replies
3
Views
418

1,195,582
Messages
6,010,581
Members
441,557
Latest member
Jbest23

### We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.

### Which adblocker are you using?

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

### Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

### Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back