Contact

AVERAGEIF Function in WPS Spreadsheet: Formula, Examples & Troubleshooting

Statistical Intermediate WPS Spreadsheet

Learn the AVERAGEIF formula in WPS Spreadsheet: average numbers matching a single condition, 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: AVERAGEIF returns the mean of numeric observations meeting one criterion. An optional third argument allows labels in one range to select corresponding amounts in another; if omitted, the function tests and averages the first range.

Availability and version history

  • Introduced: documented by 2019-06-10 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

=AVERAGEIF(range, criteria, [average_range])

The tested range and criterion are required. The optional average range supplies the numbers being averaged. Use aligned ranges of equal size for clarity, even though the dated WPS reference documents an effective-range expansion rule.

Square brackets mark optional arguments and are not typed. Examples use English function names and comma separators. Keep numeric values distinct from numeric-looking text.

Prepare the original example

Enter the original dataset in A1:F9, including headings. The Row column below is explanatory, not an extra worksheet column. Amount and Units are numeric. Keep formula outputs outside the 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

=AVERAGEIF(B2:B9,"East",D2:D9)

Expected result: 130. East values 120,210,60 total 390 across three orders.

Example 2: original comparison

=AVERAGEIF(C2:C9,"Paid",D2:D9)

Expected result: 139. Five paid amounts total 695; 695/5 =139.

Example 3: omit the average range deliberately

=AVERAGEIF(D2:D9,">=100")

Expected result: 151.25, from 120, 210, 150 and 125: their sum is 605 over four observations. The range is both tested and averaged because no third argument is supplied.

This differs from =AVERAGEIF(B2:B9,"East",D2:D9), where text labels select values from a different numeric column. Do not interchange the tested and averaged ranges without changing the question.

Advanced example: inspect which values determine the denominator

On a separate sheet create:

Row A · Group B · Measurement
1 Group Measurement
2 East 10
3 East Leave genuinely empty
4 East 0
5 West 100
=AVERAGEIF(A2:A5,"East",B2:B5)

Expected result: 5, using the two numeric East measurements 10 and 0. The direct lesson explicitly excludes an empty average cell. Three rows carry the East label, but dividing 10 by three would incorrectly treat the missing measurement as another zero.

Now replace the blank B3 with numeric 20 in a separate copy. The result becomes 10, from 10+20+0 over three observations. Record whether a zero means an observed value or a replacement policy for missing data.

Advanced example: do not combine group averages without weights

From the original table, East has three amounts totaling 390 and mean 130. North has two amounts totaling 170 and mean 85. Averaging those group means equally gives 107.5.

If the intended result is the mean across all five East-or-North orders, the correct independently reconstructed value is (390+170)/(3+2)=112. The unequal group sizes explain the difference. A formula that combines group means needs their numeric observation counts as weights, especially if some groups contain missing measurements.

Advanced example: understand the documented effective range

On the original table:

=AVERAGEIF(B2:B9,"East",D2)

The WPS reference says the top-left cell of average_range anchors an effective range with the tested range’s size and shape. Under that rule this formula uses D2:D9 and has expected result 130.

The explicit original form with D2:D9 is clearer for maintenance. The compact form does not mean that a single amount is reused for every matching label. This is a documented AVERAGEIF rule, not a blanket rule for every multi-criteria or lookup function.

Advanced example: wildcard matching and literal punctuation

The source explicitly supports ? for one character, * for a sequence, and ~ to escape a literal question mark or asterisk. Create this separate dataset:

Row A · Code B · Value
1 Code Value
2 A*B 10
3 AxB 20
4 A?B 30
5 AB 40
=AVERAGEIF(A2:A5,"A?B",B2:B5)
=AVERAGEIF(A2:A5,"A*B",B2:B5)
=AVERAGEIF(A2:A5,"A~*B",B2:B5)
=AVERAGEIF(A2:A5,"A~?B",B2:B5)

Expected results are 20, 25, 10 and 30. The first selects the three three-character codes; the second also selects AB because the sequence can be empty. The last two target the literal punctuation characters. These are finite ASCII controls, not a claim about every locale or Unicode matching case.

No matches and unresolved input cases

The original table has no South team:

=AVERAGEIF(B2:B9,"South",D2:D9)

The source documents #DIV/0! when no cells meet the criterion. This is not an observed mean of zero: there are no selected observations to divide by.

The lesson also contains an imprecise statement about an empty or text-valued range and prints one error as “#DIV0!”. Its own walkthrough legitimately tests a text label range. This guide does not interpret that statement as prohibiting text criteria ranges, nor certify every mixed-type/error case from it. Primary examples use explicit text labels paired with numeric average values.

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 function-specific official WPS evidence. Original worked formulas, title and publication date are preserved. Added outputs are independently calculated expectations, not native WPS test results.