Count if on two columns

I have a sheet that pulls from another, I need to do a count if for two different columns. I use this formula for one, how do I add another?
=COUNTIF({Date 2}, [Start Date]@row)
I need something like: =COUNTIF({Date 2}, [Start Date]@row), =COUNTIF({Review Board}, [ReviewBoard]@row=XX)
It is an agenda sheet that has a set number of minutes, then I subtract minutes based on the number of topics added for that date. Now I need to also do a type of lookup for the Review Board. There are three Review Boards and in many cases the dates are now the same.
Best Answer
-
Hey Leann
The syntax is correct. When you entered it into your destination sheet - did you get what you expected?
oops you forgot an @row
=COUNTIFS({Date 2}, [Start Date]@row, {Review Board}, [Oncology TAG]@row)
Answers
-
Hey @Leann Gibson
The COUNTIF (singular) function works when a single criteria is involved.
The COUNTIFS (plural) function works for any number of criteria - from one to whatever. My personal preference is to only use the plural version because of its versatility.
The syntax is
=COUNTIFS(range1, criteria1, range2, criteria2, etc)
Does this get you what you need?
Kelly
-
I current formula is: =COUNTIF({Date 2}, [Start Date]@row)
I want to add if the {Review Board} is + to Oncology TAG
Would it be: =COUNTIFS({Date 2}, [Start Date], {Review Board}, [Oncology TAG]@row)
-
Hey Leann
The syntax is correct. When you entered it into your destination sheet - did you get what you expected?
oops you forgot an @row
=COUNTIFS({Date 2}, [Start Date]@row, {Review Board}, [Oncology TAG]@row)
-
Cannot get it to work, must be something on my side. Thanks for the ideas.
-
Figured it out, the second criteria needed to be the name of the column.
Help Article Resources
Categories
- All Categories
- 14 Welcome to the Community
- Customer Resources
- 68K Get Help
- 474 Global Discussions
- 209 Use Cases
- 517 Announcements
- 5.6K Ideas & Feature Requests
- 87 Brandfolder
- 157 Just for fun
- 85 Community Job Board
- 521 Show & Tell
- 36 Member Spotlight
- 3 SmartStories
- 309 Events
- 37 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!