Function Problems

Use COUNTIFS in WPS Spreadsheets to Calculate a Monday Percentage

Adam DavisAdam Davis Dec 2, 2026 868 views

Question details

Calculate the percentage of 1 values among 1 and 0 values in columns whose headers contain Monday.

Calculate a Monday Percentage with COUNTIFS in WPS Spreadsheets
Product
WPS Spreadsheets
Device & OS
not provided
Scenario
A worksheet has weekday headers across columns and 1 or 0 values in a data row. The user wants a percentage for Monday columns only.
Observed behavior
The desired result is the count of Monday 1 values divided by the combined count of Monday 1 and 0 values, with division errors handled.
Before you start

Check that the weekday headers are text in row 1 and the values to count are in row 2. Adjust the matching ranges in the formula if your headers or values are elsewhere.

Solution 1Recommended

Calculate the percentage with COUNTIFS and IFERROR

Use this formula to count values under headers containing Monday and display a result without a division-by-zero error.

The numerator counts 1 values under Monday headers. The denominator adds the counts of 1 and 0 values under those headers.

The wildcard criterion *Monday* matches text headers containing Monday. The header and value ranges must have the same dimensions.

1
Enter the formula

Select an empty result cell and enter =IFERROR(COUNTIFS($B$2:$GY$2,1,$B$1:$GY$1,"*Monday*")/(COUNTIFS($B$2:$GY$2,1,$B$1:$GY$1,"*Monday*")+COUNTIFS($B$2:$GY$2,0,$B$1:$GY$1,"*Monday*")),NA()).

2
Format the result

Select the formula cell and choose Percentage from the Home tab's number-format controls.

3
Adapt the ranges or weekday

Edit the formula in the formula bar to match your header and data ranges. Replace Monday with Tuesday or another weekday to calculate that day's percentage.

Calculate the percentage with COUNTIFS and IFERROR
When there are no matching values: The formula returns #N/A if the denominator is zero or another formula error occurs. To display a blank instead, replace NA() with "".
WPS Spreadsheets

Calculate weekday percentages in WPS Spreadsheets

Use COUNTIFS and IFERROR in WPS Spreadsheets to calculate the share of 1 values under Monday headers and format the result as a percentage.

  1. 1. Open your worksheet: Open WPS Spreadsheets and use Open to select your workbook.
  2. 2. Select a result cell: Click an empty cell where you want the Monday percentage to appear.
  3. 3. Enter the formula: In the formula bar, enter =IFERROR(COUNTIFS($B$2:$GY$2,1,$B$1:$GY$1,"*Monday*")/(COUNTIFS($B$2:$GY$2,1,$B$1:$GY$1,"*Monday*")+COUNTIFS($B$2:$GY$2,0,$B$1:$GY$1,"*Monday*")),NA()) and press Enter.
  4. 4. Apply percentage formatting: Select the result cell and choose Percentage from the Home tab's number-format controls.
Count values only under headers containing a chosen weekdayHandle a zero denominator with IFERROROpen and edit Microsoft Excel XLSX workbooksFormat formula results as percentages
microsoft office alternative - wps office

Frequently Asked Questions

How do I calculate the percentage for Tuesday instead?

In the formula bar, replace each occurrence of *Monday* with *Tuesday*. Keep the header and value ranges aligned.

Why does the formula return #N/A?

The formula returns #N/A when the combined count of matching 1 and 0 values is zero or another error occurs. Check the header text and ranges; replace NA() with "" if you prefer a blank result.

Will the formula match a header such as Monday Morning?

Yes. The *Monday* criterion matches text headers that contain Monday, including Monday Morning.

Can I use dates formatted as Monday in the header row?

The wildcard criterion is intended for text headers. If the headers contain actual dates, use text weekday labels or a helper row that converts the dates to weekday names.