CountIfs, needing OR against multiple cols?

HuskyJones

New Member
Joined
Sep 30, 2015
Messages
41
Office Version
  1. 365
Platform
  1. Windows
Hey folks
You brilliantly helped me the other week with this but i've come across an issue.
What I want is
K = General Practice (in primary care)
AI = 0
AR OR AS OR AT = 1

I've got it to work as an AND but this is giving me too many people/tests e.g. AR4 and AT4 both have 1's so this is counted twice, I just need it once.
I'm sure my formula below will make you cringe but here goes...............

=COUNTIFS('Raw Data'!$K$3:$K$1003,"General Practice (in primary care)", 'Raw Data'!$AI$3:$AI$1003, "0", 'Raw Data'!$AT$3:$AT$1003, "1")+COUNTIFS('Raw Data'!$K$3:$K$1003,"General Practice (in primary care)", 'Raw Data'!$AI$3:$AI$1003, "0", 'Raw Data'!$AR$3:$AR$1003, "1")+COUNTIFS('Raw Data'!$K$3:$K$1003,"General Practice (in primary care)", 'Raw Data'!$AI$3:$AI$1003, "0", 'Raw Data'!$AS$3:$AS$1003, "1")

If you can advise how I can get AR or AS or AT that would be AMAZING!

1707227828627.png
 

Excel Facts

What does custom number format of ;;; mean?
Three semi-colons will hide the value in the cell. Although most people use white font instead.
What version of Excel are you using?

I suggest that you update your Account details (or click your user name at the top right of the forum) so helpers always know what Excel version(s) & platform(s) you are using as the best solution often varies by version. (Don’t forget to scroll down & ‘Save’)
 
Upvote 0
What version of Excel are you using?

I suggest that you update your Account details (or click your user name at the top right of the forum) so helpers always know what Excel version(s) & platform(s) you are using as the best solution often varies by version. (Don’t forget to scroll down & ‘Save’)
will do
365 enterprise
 
Upvote 0
Thanks for that (y)
How about
Excel Formula:
=ROWS(FILTER('Raw Data'!$K$3:$K$1003,('Raw Data'!$K$3:$K$1003="General Practice (in primary care)")*('Raw Data'!$AI$3:$AI$1003=0)*(('Raw Data'!$AT$3:$AT$1003=1)+('Raw Data'!$AR$3:$AR$1003=1)+('Raw Data'!$AS$3:$AS$1003=1))))
 
Upvote 0
Thanks for that (y)
How about
Excel Formula:
=ROWS(FILTER('Raw Data'!$K$3:$K$1003,('Raw Data'!$K$3:$K$1003="General Practice (in primary care)")*('Raw Data'!$AI$3:$AI$1003=0)*(('Raw Data'!$AT$3:$AT$1003=1)+('Raw Data'!$AR$3:$AR$1003=1)+('Raw Data'!$AS$3:$AS$1003=1))))
wow, thanks!!

If I don't want it to equal General Practice (in primary care) will <>General Practice (in primary care) work ?
Also (sorry) how do I stop the #CALC! if it's a zero?
 
Upvote 0
You're welcome & thanks for the feedback.
 
Upvote 0

Forum statistics

Threads
1,215,069
Messages
6,122,954
Members
449,095
Latest member
nmaske

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
Back
Top