# CountIFS

#### studio95

##### Board Regular
Morning Gents,

I have a sheet with 3 named ranges, I want (on a separate sheet) a cell which counts all occurrences of the word "Bank Holiday" within all three named ranges. I have attempted to use the following:- (AAPR1, AAPR2, AAPR3 are the named ranges)

=COUNTIFS(AAPR1,"Bank Holiday",AAPR2,"Bank Holiday",AAPR3,"Bank Holiday")

There is no error reported when the above is entered but likewise is returning no values. I don't know if it makes any difference but the word "Bank Holiday" is selected from a data validation list, I dont see why it would make a difference as when i just use =COUNTIF(AAPR1,"Bank Holiday") it returns a value.

### Excel Facts

Format cells as currency
Select range and press Ctrl+Shift+4 to format cells as currency. (Shift 4 is the \$ sign).
I'm only running Excel 2k3 here, so can't validate my thoughts, but IIRC COUNTIFS() doesn't work in that fashion. COUNTIFS() will count within one range against multiple criteria, as opposed to multiple ranges with singular criteria per range.

To achieve the result you need you would need to add multiple COUNTIF() statements together.

=COUNTIF(AAPR1,"Bank Holiday")+COUNTIF(AAPR1=2,"Bank Holiday")+COUNTIF(AAPR3,"Bank Holiday")

(Of course, I could be wrong..)

I'm only running Excel 2k3 here, so can't validate my thoughts, but IIRC COUNTIFS() doesn't work in that fashion. COUNTIFS() will count within one range against multiple criteria, as opposed to multiple ranges with singular criteria per range.

To achieve the result you need you would need to add multiple COUNTIF() statements together.

=COUNTIF(AAPR1,"Bank Holiday")+COUNTIF(AAPR1=2,"Bank Holiday")+COUNTIF(AAPR3,"Bank Holiday")

(Of course, I could be wrong..)

You are far from wrong Slinky, you are spot on other than you had (AAPR1=2) which I just changed to AAPR2! which then worked a treat!

Thank you buddy.

Replies
5
Views
361
Replies
12
Views
466
Replies
4
Views
459
Replies
14
Views
756
Replies
5
Views
598

1,218,746
Messages
6,144,262
Members
450,533
Latest member
xoxo1998

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

### Which adblocker are you using?

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

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