Count checked cells if cell on same row matches state in Numbers Following on from my previous question, I also record which entry records a competition. These are currently recorded as checkboxes. Counting them all is easy enough; I simply use the following function: 

=COUNTIF(Stevne?;TRUE)


However, I also want to count the competitions that are specific to a type of firearm.

What I've got so far is: 

=COUNTIF(Stevne?;TRUE;AND(Type:"Pistol"))


That, unfortunately, returns a Syntax error, and I can't understand why.
You need the COUNTIFS() function.

So in this case:

=COUNTIFS («gun range», true, «Firearm», "Pistol")

Accounting for ; delimiters:

=COUNTIFS («gun range»; true; «Firearm»; "Pistol")



From the help:


  The COUNTIFS function returns the number of cells in one or more
  collections that satisfy given conditions (one condition per
  collection).
  
  COUNTIFS(test-values, condition, test-values…, condition…)
  
  test-values: A collection containing values to be tested. test-values can contain any value.
  
  condition: An expression that can include comparison operators, constants, the ampersand concatenation operator, and references. The
  contents of the condition must be such that the result of comparing
  the condition to another value results in the boolean value of TRUE or
  FALSE.
  
  test-values…: Optionally include one or more additional collections containing values to be tested. Each test-values collection must be
  followed immediately by a condition expression. This pattern of
  test-values, condition can be repeated as many times as needed.
  
  condition…: If an optional collection of test-values is included, an additional expression that results in a boolean TRUE or FALSE. There
  must be one condition expression following each test-values
  collection; therefore, this function will always have an odd number of
  arguments.
  
  Notes
  
  Each value in test-values is compared to the corresponding condition.
  If the corresponding values in each collection meet the corresponding
  conditional tests, the count is increased by 1.