# counting when 2 criteria are met

#### Edrick

##### New Member
Hi. First, THANKS for offering this resource!

Now, my question...

I'm trying to count the number of instances that two criteria in a given row are met. Seems like it should be simple enough, but I haven't been able to get the formula right.

Here's an example...

column A........... column B
DESKTOP........... STORAGE
DESKTOP........... STORAGE
LAPTOP............. STORAGE
DESKTOP........... STORAGE
LAPTOP............. DEPLOYED
LAPTOP............. DEPLOYED
DESKTOP........... STORAGE

I want to show that...
# desktops deployed = 0
# desktops in storage = 4
# laptops deployed = 2
# laptops in storage = 1

What is the formula to do this?

THANKS!

### Excel Facts

Does the VLOOKUP table have to be sorted?
No! when you are using an exact match, the VLOOKUP table can be in any order. Best-selling items at the top is actually the best.
Try::
=SUMPRODUCT((A2:A65536="DESKTOP")*(B2:B65536="DEPLOYED"))
change your conditions for the other formulas.

Or use a pivot table.

That formula worked. THANK YOU!

I haven't ventured into pivot tables yet.

Edrick said:
I haven't ventured into pivot tables yet.
FYI -- I timed myself and it took me roughly all of eight (8) seconds to create the pivot table. (Took me a lot longer to duplicate your simple sample block.)
book3
ABCD
3Count of column Acolumn B
5DESKTOP44
6LAPTOP213
7Grand Total257
Sheet4

Replies
6
Views
279
Replies
0
Views
477
Replies
16
Views
759
Replies
10
Views
552
Replies
3
Views
682

1,196,426
Messages
6,015,183
Members
441,882
Latest member
LostinExcelHelp

### 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?

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