Google Sheets COUNTIF with OR: count one value or another
For COUNTIF OR, add two COUNTIFs or use SUMPRODUCT with the values in braces. COUNTIFS on one column returns 0. Plus OR with an AND condition.
On this page
=COUNTIFS(C2:C, "Late", C2:C, "Absent")Before as you see it
| A | B | C | D | F | G | |
|---|---|---|---|---|---|---|
| 1 | Name | Day | Code | Shift | What we count | Count |
| 2 | Emily | Mon | Present | Day | Late or Absent (COUNTIFS) | 0 |
| 3 | Jacob | Mon | Late | Night | Late or Absent (one COUNTIF) | 0 |
| 4 | Sarah | Mon | Absent | Day | Night shift, Late or Absent | 0 |
| 5 | Michael | Mon | Present | Night | Rows in the log | 16 |
| 6 | Emily | Tue | Late | Day | ||
| 7 | Jacob | Tue | Present | Night | ||
| 8 | Sarah | Tue | Present | Day | ||
| 9 | Michael | Tue | Absent | Night | ||
| 10 | Emily | Wed | Present | Day | ||
| 11 | Jacob | Wed | Late | Night | ||
| 12 | Sarah | Wed | Excused | Day | ||
| 13 | Michael | Wed | Late | Night | ||
| 14 | Emily | Thu | Present | Day | ||
| 15 | Jacob | Thu | Absent | Night | ||
| 16 | Sarah | Thu | Late | Day | ||
| 17 | Michael | Thu | Present | Night |
What changed
G2two COUNTIFs addedG3SUMPRODUCT around a listG4the list plus Night
After Fixed tab
| A | B | C | D | F | G | |
|---|---|---|---|---|---|---|
| 1 | Name | Day | Code | Shift | What we count | Count |
| 2 | Emily | Mon | Present | Day | Late or Absent (two COUNTIFs) | 8 |
| 3 | Jacob | Mon | Late | Night | Late or Absent (list in braces) | 8 |
| 4 | Sarah | Mon | Absent | Day | Night shift, Late or Absent | 5 |
| 5 | Michael | Mon | Present | Night | Rows in the log | 16 |
| 6 | Emily | Tue | Late | Day | ||
| 7 | Jacob | Tue | Present | Night | ||
| 8 | Sarah | Tue | Present | Day | ||
| 9 | Michael | Tue | Absent | Night | ||
| 10 | Emily | Wed | Present | Day | ||
| 11 | Jacob | Wed | Late | Night | ||
| 12 | Sarah | Wed | Excused | Day | ||
| 13 | Michael | Wed | Late | Night | ||
| 14 | Emily | Thu | Present | Day | ||
| 15 | Jacob | Thu | Absent | Night | ||
| 16 | Sarah | Thu | Late | Day | ||
| 17 | Michael | Thu | Present | Night |
Add one COUNTIF per value, with a plus sign between them, to count the rows where a column holds one value or another. A single COUNTIFS that names both values for the same column returns 0 instead. On the attendance log in Figure 1, the Fixed tab has =COUNTIF(C2:C, "Late") + COUNTIF(C2:C, "Absent") in G2, and it returned 8: five Late rows plus three Absent rows. A cell in column C holds a single code, so no row can match both halves, and none is counted twice. The only parts to swap for another log are C2:C, the column being counted, and the two quoted words. With three or more values, a list in braces inside SUMPRODUCT and COUNTIF saves repeating the function, as the first section shows.
On the Broken tab, G2 holds =COUNTIFS(C2:C, "Late", C2:C, "Absent") instead. Sheets calculates it and puts a plain 0 in the cell, with no error and no warning triangle. COUNTIFS takes pairs of a range and a condition and counts a row only when all of its pairs hold. Both pairs here test column C, so C3 would have to equal Late and Absent at the same time.
G3 on that tab tries =COUNTIF(C2:C, "Late OR Absent") and also returned 0. Google's COUNTIF page gives ? and * as the wildcard characters for text, and OR is not one of them, so Sheets looked for a cell whose whole text is Late OR Absent. Column C has none.

More than two values, with a list in braces inside SUMPRODUCT and COUNTIF
Once there are more than two codes, a shorter form puts them in curly braces. =SUMPRODUCT(COUNTIF(C2:C, {"Late", "Absent"})) in G3 of the Fixed tab also returned 8. The braces hand COUNTIF a small list, COUNTIF returns one count per item, and SUMPRODUCT adds those counts.
The outer function matters here. B2 on the More cases tab uses SUM instead and returned 5, which is the Late count alone, and nothing on screen marks it as wrong. The bare list with no function around it, in B4, returned 5 as well. Wrapping the SUM version in ARRAYFORMULA, as B3 does, brought it back to 8.

The #N/A in B5 of that figure is one more attempt, =COUNTIF(Fixed!C2:C, "Late", "Absent"), with the second code passed as a third argument. Selecting the cell brings up this note: Wrong number of arguments to COUNTIF. Expected 2 arguments, but got 3 arguments.
| Input | 16 attendance rows, codes in column C, shifts in column D |
|---|---|
| Formula | =SUMPRODUCT(COUNTIF(C2:C, {"Late", "Absent"})) |
| Expected | 8 |
| Sheets returned | 8 Matches expected |
| Checked | 2026-11-11, free personal account |
Adding an AND condition from another column: COUNTIFS around the list in braces
Column D gives each row a shift. Jacob and Michael work nights, Emily and Sarah work days. G4 asks how many Night rows are Late or Absent, which is an OR inside column C and an AND with column D. Since COUNTIFS already joins its pairs with AND, the shift goes in as an ordinary pair and the OR stays in the braces.
The Fixed tab has =SUMPRODUCT(COUNTIFS(C2:C, {"Late", "Absent"}, D2:D, "Night")), and it returned 5. Sheets ran COUNTIFS once for Late with Night, matching Jacob on Monday and Wednesday and Michael on Wednesday, then once for Absent with Night, matching Michael on Tuesday and Jacob on Thursday. SUMPRODUCT added the 3 and the 2. The broken G4 had kept the impossible Late-and-Absent pair with Night stacked on top, and an extra pair can only remove rows, so it stayed at 0. The COUNTIFS page also requires every added range to have the same number of rows and columns as the first; C2:C and D2:D both start at row 2 and run to the bottom, so they line up.

The Try it yourself tab is the Broken tab again, three zeros included. Put =COUNTIF(C2:C, "Late") + COUNTIF(C2:C, "Absent") in G2, =SUMPRODUCT(COUNTIF(C2:C, {"Late", "Absent"})) in G3, and =SUMPRODUCT(COUNTIFS(C2:C, {"Late", "Absent"}, D2:D, "Night")) in G4. G2:G4 should then read 8, 8 and 5, the same as the Fixed tab.
OR across two columns counts some rows twice when COUNTIFs are added
Adding COUNTIFs is safe while both conditions test the same column. Across two columns, one row can meet both conditions and get counted twice. Row 3 is Jacob, Late, Night, and a count of rows that are Late or on the Night shift should include him once.
B6 on the More cases tab adds COUNTIF(Fixed!C2:C, "Late") and COUNTIF(Fixed!D2:D, "Night"), and it returned 13: 5 Late rows plus 8 Night rows. Three rows are Late and Night together, so they were counted twice, and the real number of rows is 10.
B7 returned 10 with =SUMPRODUCT(--(((Fixed!C2:C="Late") + (Fixed!D2:D="Night")) > 0)). Each comparison gives TRUE or FALSE per row, and adding the two turns that into a score of 0, 1 or 2. The > 0 test turns any row with at least one match into TRUE, the double minus turns TRUE into 1, and SUMPRODUCT adds the ones. Jacob's Monday row scores 2 and still adds just 1.
A trailing space, lowercase and a wildcard in the COUNTIF criterion
Column E of the More cases tab tests how exactly a typed code has to match. It holds Late in E2, Late followed by a space in E3, and late in lowercase in E4. =COUNTIF(E2:E4, "Late") returned 2: lowercase matched, since COUNTIF is not case sensitive, and the trailing space did not. =COUNTIF(E2:E4, "Late*") returned 3, because the asterisk also covers the space. Matching on part of the text is the subject of COUNTIF with wildcards and "if cell contains".
Take-home copy. Four tabs: Broken (as you see it), Fixed, Try it yourself, More cases. It opens as a copy in your own Drive.