Contact

COUNTIFS Function in WPS Spreadsheet: Formula, Examples & Troubleshooting

Statistical Intermediate WPS Spreadsheet

Learn the COUNTIFS formula in WPS Spreadsheet: count rows meeting multiple aligned conditions, with reproducible examples, expected answers and compatibility cautions.

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

Quick answer: COUNTIFS counts corresponding positions that satisfy every supplied condition. Range/criterion pairs use AND logic. It is useful for combinations such as a team, payment status and numeric threshold, provided each range describes the same records in the same order.

Availability and version history

  • Introduced: documented by 2019-05-08 in the official WPS lesson; original introduction is not established.
  • Availability: WPS Office for Windows Personal; no numeric release is stated in the lesson metadata.
  • Scope: current supported build limits remain unverified. The Windows lesson does not establish equivalent support in other WPS clients.
  • Checked: October 14, 2026. Function-specific documentation and independent calculations; no new native WPS test was performed.

Syntax and arguments

=COUNTIFS(criteria_range1, criteria1, [criteria_range2, criteria2], ...)

The first range/criterion pair is required; additional pairs are optional. The dated Windows Personal lesson describes up to 127 pairs, which is not a verified maximum for every current WPS build. Each additional range must have the same shape as the first.

Square brackets mark optional arguments and are not typed. Examples use English function names and comma separators; use the separator required by your workbook locale.

Prepare the original example

Enter the original dataset in A1:F9, including headings. Row is explanatory, not an extra worksheet column. Amount and Units are numeric. Keep outputs outside the source data.

Row A · Item B · Team C · Status D · Amount E · Units F · Agent
1 Item Team Status Amount Units Agent
2 Pen East Paid 120 12 Ana
3 Pad West Pending 75 5 Bo
4 Box East Paid 210 7 Ana
5 Tape North Paid 90 0 Cy
6 Folder West Paid 150 3 Bo
7 Pen East Pending 60 8 Dee
8 Pad West Paid 125 12 Ana
9 Box North Pending 80 4 Cy

Example 1: original control

=COUNTIFS(B2:B9,"East",C2:C9,"Paid")

Expected result: 2. Rows 2 and 4 are both East and Paid.

Example 2: original comparison

=COUNTIFS(B2:B9,"West",D2:D9,">=100")

Expected result: 2. Two West orders have amounts at least 100: rows 6 and 8.

Example 3: count a bounded numeric interval

=COUNTIFS(D2:D9,">=75",D2:D9,"<125")

Expected result: 4, selecting 120, 75, 90 and 80. The lower endpoint is included; 125 is excluded. Changing the last criterion to "<=125" gives 5. A formula can use the same range more than once to impose separate lower and upper bounds.

As an independent boundary control, put 74, 75, 124.9 and 125 in K2:K5. =COUNTIFS(K2:K5,">=75",K2:K5,"<125") returns the expected count 2. This small control makes the inclusivity rule easier to inspect than a large dataset.

Advanced example: combine text, numeric and referenced criteria

Put West in H3 and the number 100 in H4:

=COUNTIFS($B$2:$B$9,H3,$C$2:$C$9,"Paid",$D$2:$D$9,">="&H4)

Expected result: 2, from rows 6 and 8. Changing H4 to 130 gives 1. Changing H3 to East while keeping 130 also gives 1, from row 4.

The operator belongs in quotes and is joined to the cell reference. Writing ">=H4" would put the letters H4 inside a text criterion instead of using its numeric value. Absolute references prevent copying the formula from shifting the data ranges.

Advanced example: build an OR count without double-counting

The original table contains three East orders and five Paid orders. Two orders belong to both groups. To count rows that are East or Paid:

=COUNTIFS(B2:B9,"East")+COUNTIFS(C2:C9,"Paid")-COUNTIFS(B2:B9,"East",C2:C9,"Paid")

Expected result: 6, from 3+5-2. Adding the first two counts alone gives 8 because rows 2 and 4 are counted twice. Subtracting the intersection implements this particular two-set union.

Putting both conditions into one COUNTIFS instead counts their intersection and gives 2. Neither formula deduplicates repeated business identifiers: the unit counted remains a corresponding position in the supplied ranges.

Advanced example: distinguish wildcards from literal punctuation

On a separate sheet, enter the codes A*B, AxB, A?B and AB in A2:A5. Enter statuses Open, Closed, Open and Open in B2:B5:

=COUNTIFS(A2:A5,"A?B")
=COUNTIFS(A2:A5,"A*B")
=COUNTIFS(A2:A5,"A~*B")
=COUNTIFS(A2:A5,"A~?B")
=COUNTIFS(A2:A5,"A?B",B2:B5,"Open")

Expected results are 3, 4, 1, 1 and 2. The question mark matches exactly one character. The asterisk matches a sequence, including the empty sequence in AB. A tilde makes the following question mark or asterisk literal. The final formula applies both the code pattern and status condition.

These are finite ASCII controls under the lesson’s documented wildcard rules. They do not establish every locale, Unicode, case-sensitivity or tilde-sequence behavior.

Advanced check: an empty criterion reference means zero

In M2:M5 enter the numbers 0, 1, 0 and 2. Leave N2 genuinely empty:

=COUNTIFS(M2:M5,N2)

Expected result: 2. The source explicitly says an empty cell supplied as the criterion is treated as zero. Setting N2 to 1 changes the count to 1.

This is not a complete rule for all blank cells being tested, nor does it certify every formula returning empty text. The control keeps the criteria range numeric so it isolates the documented criterion-reference behavior.

Range alignment and troubleshooting

Every criteria range must have the same number of rows and columns as the first range. The ranges can be nonadjacent, but corresponding positions must represent the same record. Equal cell counts alone are insufficient: a vertical four-cell range and a horizontal four-cell range have different shapes.

Even same-shaped ranges can be misaligned. On the original data, =COUNTIFS(B2:B8,"East",C3:C9,"Paid") has modeled expected result 2, pairing different source rows. It happens to equal the correct full-table East/Paid result, but for the wrong records. The first position pairs East from row 2 with Pending from row 3 and fails; later positions create different matches. A plausible count does not prove correct row alignment.

No matching rows produce a count of zero: =COUNTIFS(B2:B9,"South") has expected result 0. Inspect dimension mistakes, imported types and quoted criteria separately; the captured lesson does not establish every native error code. See COUNTIF for one condition and SUMIFS when the desired output is a numeric total rather than a count.

Related guides already published for this function: Microsoft Excel | Google Sheets | LibreOffice Calc | Apache OpenOffice Calc | Gnumeric

Each comparison guide is researched separately; a shared function name does not establish identical platform availability or edge behavior.

Evidence level: The complete article was reviewed against the direct official WPS lesson. Original worked formulas, title, date and dataset are preserved. Added outputs are independently calculated expectations, not native WPS test results.