Contact

COUNTIF Function in Apple Numbers: Examples and Syntax

Statistical Beginner Apple Numbers

COUNTIF in Apple Numbers: count outstanding tasks in a numbers table using practical sample data, clear expected results, pitfalls and the official function documentation.

Verification status: See the evidence and test scope described in this guide. How formula examples are checked

Quick answer: =COUNTIF(A2:A6,"Late") returns 2 for the five task statuses below. COUNTIF counts cells meeting one condition; its result is a count, not a list of matching row numbers.

Availability and version history

  • Introduced: Documented in Apple’s Formulas and Functions Help 15.4; the original introduction release is not established.
  • Availability: Currently documented in Apple’s Functions Help 15.4 documentation edition; it is not a final supported-version endpoint.
  • Scope: Shared iWork function help. Availability in individual clients and older releases is not established by this check.
  • Checked: October 14, 2026, against the official COUNTIF reference. Documentation and independent count checks; no native Numbers test.

Syntax and criteria

=COUNTIF(test-array, condition)

Both arguments are required. The collection supplies candidate values; the condition specifies the test. Apple’s COUNTIF reference permits comparison operators, constants, references, concatenation and wildcards. It also documents REGEX-based conditions, a separate pattern syntax not needed here.

Write comparison conditions such as ">5" as quoted text. To take the threshold from a cell, concatenate the operator with that cell: ">"&C2. That keeps a changing threshold out of the hard-coded formula.

Practice table: outstanding tasks

Create a Numbers table named Tasks, with six columns A:F and eight rows including one header row. Put Status in A1 and enter the original statuses in A2:A6:

Row A: Status
2 Late
3 Done
4 Late
5 Review
6 Done

Enter =COUNTIF(A2:A6,"Late") in F2; expect 2, from rows 2 and 4. Enter =COUNTIF(A2:A6,"D*") in F3; expect 2, the two Done entries.

For a reusable summary, put Criterion and Count in C1:D1. Enter Late, Done, Review, Cancelled in C2:C5. Put =COUNTIF($A$2:$A$6,C2) in D2 and fill to D5.

Expected D2:D5 are 2, 2, 1, 0. The input range stays fixed while each copied formula reads its own criterion. A zero for Cancelled is correct for this fixture; it does not indicate a formula failure.

In F4 enter =COUNTIF(A2:A6,"Late")+COUNTIF(A2:A6,"Review"); expect 3. Those two complete labels are mutually exclusive for one cell. In F5 enter =COUNTIF(A2:A6,"<>Done"); expect 3 for this fully populated, text-only list. That example does not establish how every blank or error value behaves with a not-equal condition.

Wildcards versus literal punctuation

Create a separate table named PartLabels, with four columns and seven rows. Put Label in A1, and enter the following plain text in A2:A7 without surrounding quote characters:

A-1, A-2, AB-1, A-*, A-?, B-1

Use D2:D7 for these controls:

Cell Formula Expected result
D2 =COUNTIF(A2:A7,"A-?") 4
D3 =COUNTIF(A2:A7,"A-*") 4
D4 =COUNTIF(A2:A7,"A-~*") 1
D5 =COUNTIF(A2:A7,"A-~?") 1
D6 =COUNTIF(A2:A7,"A*") 5
D7 =COUNTIF(A2:A7,"?-?") 5

Apple documents ? for one character, * for multiple characters and ~ for treating the following wildcard character literally. D2 therefore includes the labels whose final character is itself an asterisk or question mark. D4 and D5 each match only their literal punctuation label.

AB-1 does not match A-? because its extra B occurs before the hyphen. It does match A*. A visibly similar criterion can answer a different matching question.

Advanced: use a numeric threshold cell

Create a table named Quantities, with five columns and seven rows. Put Units in A1 and enter 2, 5, 5, 8, 12, 15 in A2:A7. Put the numeric threshold 5 in C2.

Enter these formulas in E2:E6:

Cell Formula Expected result
E2 =COUNTIF(A2:A7,">"&C2) 3
E3 =COUNTIF(A2:A7,">="&C2) 5
E4 =COUNTIF(A2:A7,">10") 2
E5 =COUNTIF(A2:A7,">=5")-COUNTIF(A2:A7,">12") 4
E6 =COUNTIFS(A2:A7,">=5",A2:A7,"<=12") 4

The repeated 5 values make the strict versus inclusive boundary visible. E5 removes the values above 12 from those at least 5; E6 expresses the same closed interval with COUNTIFS.

Change only C2 to 8. E2 becomes 2 and E3 becomes 3; the hard-coded formulas E4:E6 stay 2, 4, 4. Restore C2 to 5 when comparing with the original expected table.

Adding the counts for >5 and >10 would give 3+2=5, but only three distinct cells satisfy either test. The second set is contained in the first, so addition double-counts the 12 and 15. Use disjoint labels or account for overlap when constructing an OR total.

Each sample uses known numeric or exact text inputs. Apple’s page does not establish every case-sensitivity, blank, imported-error or coercion edge case; do not treat the examples as a complete parser test. Diagnose an unexpected match by inspecting the criterion and stored value separately.

Keep formula outputs outside the source ranges. When moving a formula to another Numbers table, use the qualifier inserted by the formula editor. Follow the document’s argument-separator convention; a range colon is not an argument separator.

COUNT counts numeric/date values, COUNTA counts occupied content, and SUMIFS adds amounts for aligned conditions. Choose the function according to the question rather than the appearance of the output.