# Countifs with Multiple Criteria

#### BillHassall

##### New Member
I am trying to use Countifs to count the same set of cells but with different criteria either by directly inputiing the names that I want to find (H5, H6 and H7, this is text and not cell number) or by reference to the cells that the information is in (cells D1, D2 & D3), so what I want to achieve is one of the following

COUNTIFS(September!\$G:\$G,{"H5";"H6";"H7"},September!\$B:\$B,Totals!B\$17)

This only gives cells that have H5 in them not H6 or H7

My preferred method would be as follows which doesnt work at all

COUNTIFS(September!\$G:\$G,D1 or D2 or D3,September!\$B:\$B,Totals!B\$17)

In the second case cells D1,D2 & D3 would contain the text H5, H6 & H7

Thanks

Bill

### Excel Facts

Can a formula spear through sheets?
Use =SUM(January:December!E7) to sum E7 on all of the sheets from January through December
Try:
=SUM(COUNTIFS(September!\$G:\$G,{"H5";"H6";"H7"},September!\$B:\$B,Totals!B\$17))

To use the cell references

=SUMPRODUCT(COUNTIFS(September!\$G:\$G,D1:D3,September!\$B:\$B,Totals!B\$17))

Excellent, both work a treat, thanks for your help, spent ages trying to find the answer before posting

Bill

Replies
1
Views
218
Replies
10
Views
691
Replies
2
Views
479
Replies
1
Views
413
Replies
12
Views
576

1,203,269
Messages
6,054,467
Members
444,727
Latest member
Mayank Sharma

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