Calculate an Average by Y or N Rating in WPS Spreadsheets
Question details
Calculate the average member count for entities whose rating is Y.

- 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.
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.
Use AVERAGEIF to average counts for Y-rated rows
Use this formula when you have one rating criterion.
Click an empty cell where you want the average to appear.
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.
To average N-rated rows instead, edit the formula in the formula bar and replace "Y" with "N".

Use AVERAGEIFS for an expandable criteria formula
Use AVERAGEIFS if you prefer consistent IFS formulas or may add more criteria later.
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. Open the worksheet: Open WPS Spreadsheets and choose File > Open to select your workbook.
- 2. Check the columns: Find the member count and rating columns, such as B2:B6 and C2:C6.
- 3. Calculate the average: Click an empty cell, enter =AVERAGEIF(C2:C6,"Y",B2:B6), and press Enter.
- 4. Save the workbook: Choose File > Save to keep the formula in your workbook.

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.




