Countif statement using two sets of criteria
I am attempting to find the number of "Tactical" cells within a specified date range. I am receiving an error UNPARSEABLE.
=COUNTIFS([Date Presented to FRB]192:[Date Presented to FRB]207, MONTH(@cell) = 4), + COUNTIFS([Force Level_FRB]:[Force Level_FRB] = "Tactical")
Best Answers
-
The error itself is caused by the comma before the + and a missing comma before the criteria in the second COUNTIFS, but to be able to count for what you describe in your post, you are going to want something more like...
=COUNTIFS([Date Presented to FRB]192:[Date Presented to FRB]207, MONTH(@cell) = 4, [Force Level_FRB]192:[Force Level_FRB]207, @cell = "Tactical")
-
To use dates in formulas, you have to use the DATE function. To have multiple criteria sets for the same range while only referencing the range once, you will need an AND function.
=COUNTIFS([Date Presented to FRB]179:[Date Presented to FRB]207, AND(@cell>= DATE(2021, 02, 01), @cell<= DATE(2021, 04, 15)), [Force Level_FRB]179:[Force Level_FRB]207, @cell = "TACTICAL")
Answers
-
The error itself is caused by the comma before the + and a missing comma before the criteria in the second COUNTIFS, but to be able to count for what you describe in your post, you are going to want something more like...
=COUNTIFS([Date Presented to FRB]192:[Date Presented to FRB]207, MONTH(@cell) = 4, [Force Level_FRB]192:[Force Level_FRB]207, @cell = "Tactical")
-
How would I write the formula if I am trying to using multiple dates ranging from 02/01/21 through 04/15/21 and capture all "Tactical" cases?
I am using this formula but it is not working.
=COUNTIFS([Date Presented to FRB]179:[Date Presented to FRB]207, ("@cell >=02/01/21, @cell <=04/15/21"), [Force Level_FRB]179:[Force Level_FRB]207, @cell = "TACTICAL")
The returned value is "0".
-
To use dates in formulas, you have to use the DATE function. To have multiple criteria sets for the same range while only referencing the range once, you will need an AND function.
=COUNTIFS([Date Presented to FRB]179:[Date Presented to FRB]207, AND(@cell>= DATE(2021, 02, 01), @cell<= DATE(2021, 04, 15)), [Force Level_FRB]179:[Force Level_FRB]207, @cell = "TACTICAL")
Help Article Resources
Categories
- All Categories
- 14 Welcome to the Community
- Customer Resources
- 64.9K Get Help
- 439 Global Discussions
- 138 Industry Talk
- 471 Announcements
- 4.9K Ideas & Feature Requests
- 129 Brandfolder
- 148 Just for fun
- 68 Community Job Board
- 488 Show & Tell
- 33 Member Spotlight
- 2 SmartStories
- 300 Events
- 36 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!