Function Problems

Calculate an Average by Y or N Rating in WPS Spreadsheets

Amos GikundaAmos Gikunda Nov 18, 2026 870 views

Question details

Calculate the average member count for entities whose rating is Y.

Calculate an Average by Y or N Rating in WPS Spreadsheets
Product
WPS Spreadsheets or Microsoft Excel
Device & OS
not provided
Scenario
A worksheet has member counts in one column and Y/N ratings in another.
Observed behavior
The desired average includes only member counts from rows rated Y.
Before you start

Identify the member count and rating columns, and make sure their ranges cover the same rows. The examples use member counts in B2:B6 and ratings in C2:C6.

Solution 1Recommended

Use AVERAGEIF to average counts for Y-rated rows

Use this formula when you have one rating criterion.

1
Select a result cell

Click an empty cell where you want the average to appear.

2
Enter the formula

Type =AVERAGEIF(C2:C6,"Y",B2:B6) in the selected cell and press Enter. Replace the ranges with your rating and member count ranges if needed.

3
Change the criterion if needed

To average N-rated rows instead, edit the formula in the formula bar and replace "Y" with "N".

Use AVERAGEIF to average counts for Y-rated rows
Exact ratings and text containing Y: The criterion "Y" matches a rating equal to Y. If the rating cells contain longer text and you need any cell containing Y, use "*Y*" instead.
Calculate in WPS Spreadsheets

Average Y-rated member counts in WPS Spreadsheets

Open your worksheet in WPS Spreadsheets and use AVERAGEIF to calculate the average member count for rows with a Y rating.

  1. 1. Open the worksheet: Open WPS Spreadsheets and choose File > Open to select your workbook.
  2. 2. Check the columns: Find the member count and rating columns, such as B2:B6 and C2:C6.
  3. 3. Calculate the average: Click an empty cell, enter =AVERAGEIF(C2:C6,"Y",B2:B6), and press Enter.
  4. 4. Save the workbook: Choose File > Save to keep the formula in your workbook.
Average member counts using a Y or N criterionOpen and edit Microsoft Excel XLSX and XLS filesUse familiar spreadsheet formulas and cell references
microsoft office alternative - wps office

Frequently Asked Questions

How do I average member counts for N-rated rows?

Use =AVERAGEIF(C2:C6,"N",B2:B6), replacing the ranges with your own rating and member count ranges.

Why does the formula return a #DIV/0! error?

The formula can return #DIV/0! if no matching rows have numeric member counts. Check the ratings in C2:C6 and ensure the corresponding values in B2:B6 are numbers.

What is the difference between AVERAGEIF and AVERAGEIFS?

AVERAGEIF handles one criterion and puts the criteria range first. AVERAGEIFS puts the average range first and supports one or more criteria.

Can I match ratings that contain Y as part of longer text?

Yes. Use a wildcard criterion, such as =AVERAGEIF(C2:C6,"*Y*",B2:B6). This matches any rating text containing Y, not just cells equal to Y.