Excel Guides

Counting with Two Criteria in Excel

You can count cells in Excel that meet two conditions by using the COUNTIF function. For example, if you want to count cells that are greater than 30 and less than 40, you would use the following formula:

=COUNTIF(A1:A10,">30")+COUNTIF(A1:A10,"<40")

This would give you a count of all cells between 30 and 40, inclusive. If you want to exclude cells that are equal to 30 or 40, you would use the following formula:

=COUNTIF(A1:A10,">30")+COUNTIF(A1:A10,"<40")-COUNTIF(A1:A10,30)-COUNTIF(A1:A10,40)

Move beyond 

Excel

Get started with Causal today.
Build models effortlessly, connect them directly to your data, and share them with interactive dashboards and beautiful visuals.