Function Problems

Count Multiple Text Criteria and Zero Values in WPS Spreadsheets

Adam DavisAdam Davis Nov 18, 2026 870 views

Question details

Count rows where column T contains either Other or Temporary and column W contains zero.

Count Rows with Multiple Text Criteria and Zero Values in WPS Spreadsheets
Product
WPS Spreadsheets
Device & OS
not provided
Scenario
A worksheet has text categories in column T and values in column W across rows 2 through 3031.
Observed behavior
The desired count includes rows matching either text category and the zero criterion in the same row.
Before you start

Check that your data is in rows 2 through 3031 and adjust both ranges if your worksheet uses different rows. Decide whether blank cells in column W should be excluded from the count.

Solution 1Recommended

Add Two COUNTIFS Formulas to Count Both Categories

Use this approach to count Other and Temporary separately, then add the results.

1
Select a result cell

Open the worksheet in WPS Spreadsheets and click an empty cell where you want the count to appear.

2
Enter the formula

Type =COUNTIFS(T2:T3031,"Other",W2:W3031,0)+COUNTIFS(T2:T3031,"Temporary",W2:W3031,0) and press Enter.

3
Check the ranges

If your data covers different rows, edit the formula in the formula bar so both column ranges start and end on the same rows.

Add Two COUNTIFS Formulas to Count Both Categories
Exclude blank cells if needed: If blank cells in column W are being counted as zero, add W2:W3031,"<>" to each COUNTIFS call. Alternatively, use the SUMPRODUCT formula below, which explicitly excludes blanks.
WPS Spreadsheets

Count Matching Rows in WPS Spreadsheets

Open your worksheet in WPS Spreadsheets and combine two COUNTIFS formulas to count rows that match either category and a zero value.

  1. 1. Open your workbook: Launch WPS Spreadsheets and use Open to select your workbook.
  2. 2. Choose a result cell: Click an empty cell outside the data range.
  3. 3. Enter the count formula: Type =COUNTIFS(T2:T3031,"Other",W2:W3031,0)+COUNTIFS(T2:T3031,"Temporary",W2:W3031,0) and press Enter.
  4. 4. Verify the result: Check the result against your data and adjust the row ranges in the formula bar if necessary. If blanks must be excluded, use the SUMPRODUCT formula above.
Combine COUNTIFS results for multiple text criteriaUse SUMPRODUCT to explicitly exclude blank cellsOpen and edit Microsoft Excel XLSX and XLS filesWork with a familiar spreadsheet interface
microsoft office alternative - wps office

Frequently Asked Questions

Why are two COUNTIFS formulas added together?

Each COUNTIFS call counts one category with a zero in column W. Adding the two results gives the count for Other or Temporary.

How do I exclude blank cells in column W?

Use =SUMPRODUCT(((T2:T3031="Other")+(T2:T3031="Temporary"))*(W2:W3031=0)*(W2:W3031<>"")) in an empty cell. The final condition excludes cells that appear blank.

Can I use a different range of rows?

Yes. Change every range in the formula to match your data, such as T2:T500 and W2:W500. The ranges must cover the same rows.

How can I count another text category as well?

Add another COUNTIFS call with the new category, such as +COUNTIFS(T2:T3031,"Seasonal",W2:W3031,0), to the end of the existing formula.