nested count if statement

organicjan

New Member
Joined
Jul 23, 2002
Messages
34
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.

Thanks for your help!
 

Excel Facts

Copy formula down without changing references
If you have =SUM(F2:F49) in F50; type Alt+' in F51 to copy =SUM(F2:F49) to F51, leaving the formula in edit mode. Change SUM to COUNT.
Give this a try.


=COUNTIF(A1:A10,"C")+ COUNTIF(A1:A10,"E")+COUNTIF(A1:A10,"W")
 
Upvote 0
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.

Thanks for your help!

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
 
Upvote 0

Forum statistics

Threads
1,214,527
Messages
6,120,058
Members
448,940
Latest member
mdusw

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.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

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

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

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
Back
Top