Counif with 2 criteria

RPA

Board Regular
Joined
May 14, 2004
Messages
55
I want to count items if they meet criteria in two columns. For example - Countif = Canada and is > 500.

I know how to perform sumproduct / array formulas....but, they take up too much memory.

Is there a formula that can perform this? (In this case, I don't want to use a pivot table)

Thanks,
 

Excel Facts

Repeat Last Command
Pressing F4 adds dollar signs when editing a formula. When not editing, F4 repeats last command.

Domenic

MrExcel MVP
Joined
Mar 10, 2004
Messages
19,696
If Column A, starting at A2, contains the Country, and Column B, starting at B2, contains the number, try...

C2, copied down:

=IF(A2="Canada",if(B2>500,1,""),"")

Then use...

=COUNTIF(C2:C100,1)

Adjust the range accordingly.

Hope this helps!
 

RPA

Board Regular
Joined
May 14, 2004
Messages
55
Thanks Domenic,

The formula you generously provided would require addind a new row and I have multiple rows I want to ultimately use the formula for.

What I am hoping to do is get the result in one cell without having to create extra columns....maybe this isn't posible?

For example: Countif(E:E,"Canada" & F:F, "> 500").

Thanks,

Rick
 

pgc01

MrExcel MVP
Joined
Apr 25, 2006
Messages
19,884
Hi Rick

How about DCOUNTA? You'd only need 4 cells for the criteria.

Hope this helps
PGC
 

Forum statistics

Threads
1,136,354
Messages
5,675,299
Members
419,560
Latest member
g3org

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
Top