Reputation: 1
Looking for a formula for 3 criteria in google sheets to count if all are TRUE:
Number of entries that equal a specific region
Number of entries that say "Yes"
Number of entries that have a date submitted in 2024
Column A is the Regions: Eastern, Western, Southern
Column B is Accepted, with Yes or No in the cells
Column C is Date Submitted (date format is MM/DD/YY)
I would like to know how many Accepted entries there were for the Western Region in 2024.
I tried combinations of Countifs()
formulas, but I am not sure how to get the date equals the year 2024.
Upvotes: 0
Views: 153
Reputation: 37050
Here are few other approaches.
=SUMPRODUCT((A2:A="Southern")*(B2:B="Yes")*(C2:C>=DATE(2024,1,1))*(C2:C<=DATE(2024,12,31)))
=SUMPRODUCT(--(FILTER(A2:A,A2:A="Southern",B2:B="Yes",C2:C>=DATE(2024,1,1),C2:C<=DATE(2024,12,31))<>""))
=QUERY(A2:C,"select count(A) where A='Southern' and B='Yes' and C>= date '2024-01-01' and C<= date '2024-12-31' label count(A) ''")
Upvotes: 1
Reputation: 1859
Try this:
=COUNTIFS(A2:A, "Western", B2:B, "Yes", ARRAYFORMULA(YEAR(C2:C)), 2024)
You may also try this:
=COUNTIFS(A2:A, "Western", B2:B, "Yes", C2:C, ">=" & DATE(2024,1,1), C2:C, "<=" & DATE(2024,12,31))
In the example, I did not see any
Yes
onWestern
, so I changed for testing purposes.
Upvotes: 1