Logic question with Countifs function

anderma8

New Member
Joined
Oct 29, 2008
Messages
40
Office Version
  1. 365
Platform
  1. Windows
I have the following formula working:
=COUNTIFS('Detailed Incidents'!$D$2:$D$1000,”New Jersey”,'DetailedIncidents'!$I$2:$I$1000,”Newark”,'Detailed Incidents'!$B$2:$B$1000,”January*”,'DetailedIncidents'!$B$2:$B$1000,”*2018”))
But I want to include if another corresponding column hasANY of the following values: Resident,Visitor, Passing Through
I was thinking I would incorporate a nested if statement butI’ve run into a wall. Any suggestions onhow to append the formula to include a list of values?

 

Excel Facts

Highlight Duplicates
Home, Conditional Formatting, Highlight Cells, Duplicate records, OK to add pink formatting to any duplicates in selected range.
Something like:

=SUM(COUNTIFS('Detailed Incidents'!$D$2:$D$1000,"New Jersey",'Detailed Incidents'!$I$2:$I$1000,"Newark",'Detailed Incidents'!$B$2:$B$1000,"January*",'Detailed Incidents'!$B$2:$B$1000,"*2018",'Detailed Incidents'!$Z$2:$Z$1000,{"Resident","Visitor","Passing Through"}))
 
Upvote 0
Thanks Eric! I've tried several versions using hard coded values as well as a range, but I'm still missing something... I'll keep trying!
 
Upvote 0
If you use a range A1:A3, with Resident in A1, Visitor in A2, etc., you'll need to confirm the formula by pressing Control+Shift+Enter, not just Enter. Other than that, keep trying it. If you have more questions, let us know.
 
Upvote 0

Forum statistics

Threads
1,214,376
Messages
6,119,172
Members
448,870
Latest member
max_pedreira

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