Contact

ONLYOFFICE RANK.AVG: Average Tie Positions and Rank-Sum Checks

Statistical Intermediate ONLYOFFICE

Calculate average positions for ties in ONLYOFFICE, compare best-position ranks and verify complete rank totals with reproducible worksheets.

Verification status: See the evidence and test scope described in this guide. How formula examples are checked

RANK.AVG assigns the average occupied position to tied values. If two observations occupy positions two and three, each receives 2.5. The result may therefore be fractional even when every input is an integer.

Availability and version history

  • Introduced: The Desktop Editors changelog explicitly lists RANK.AVG among functions added in version 4.4.1. Docs and mobile introduction dates remain unknown.
  • Availability: Documented in the current ONLYOFFICE Spreadsheet Editor help; no final supported-version endpoint is established.
  • Scope: Desktop and Docs release separately. This history does not establish identical behavior across older builds, mobile clients or every deployment.
  • Checked: October 14, 2026, against the official RANK.AVG reference and cited evidence. Examples were independently calculated; no native execution of these rank formulas was performed.

Syntax and default order

=RANK.AVG(number, ref, [order])

The required number is the value to rank; ref is the comparison range containing it. The official RANK.AVG reference defines average ranks for ties and a numeric optional order:

  • 0 or omitted: descending, highest value first.
  • Any other numeric value: ascending, lowest value first.

Use explicit 0 and 1 for readability. RANK.AVG does not calculate the average of the input measurements; it averages their positions within a tied group.

A complete tie-position worksheet

Create AverageRanks using A1:F8. Label A:F Score, Average descending, Average ascending, Best descending, Tie count and Reconstructed average. Enter A2:A8 as below.

In B2 enter =RANK.AVG(A2,$A$2:$A$8,0), C2 =RANK.AVG(A2,$A$2:$A$8,1), D2 =RANK.EQ(A2,$A$2:$A$8,0), E2 =COUNTIF($A$2:$A$8,A2), and F2 =D2+(E2-1)/2. Fill B2:F2 through row 8.

Row Score Expected B Expected C Expected D Expected E Expected F
2 90 1 7 1 1 1
3 70 2.5 5.5 2 2 2.5
4 70 2.5 5.5 2 2 2.5
5 50 5 3 4 3 5
6 50 5 3 4 3 5
7 50 5 3 4 3 5
8 20 7 1 7 1 7

The three 50s occupy descending positions four, five and six; their average is five. RANK.EQ gives each the best position, four. The helper F adds half the tie group’s extra width to that best position.

Check rank totals and direction

Use H1:I6 for labels and these checks:

Cell Formula Expected result
I2 =SUM(B2:B8) 28
I3 =SUM(C2:C8) 28
I4 =COUNT(A2:A8)*(COUNT(A2:A8)+1)/2 28
I5 =SUM(D2:D8) 24
I6 =RANK.AVG(A3,$A$2:$A$8) 2.5

Average tied ranks preserve the sum of positions 1 through 7. Best-position ranks do not preserve that sum when ties exist. In J1 enter Direction sum, and in J2 enter =B2+C2; fill through J8 for 8 in every row. Descending and ascending average ranks complement each other to n+1 for these seven numeric records.

These identities use a complete set of ranks over the same included observations. They are not guarantees for a partially ranked list or a mixed-type range with uncertain inclusion rules.

Reproduce the official illustration

On VendorAverageRank, put 7, 6, 5 and 5 in A1:A4. Enter =RANK.AVG(A3,A1:A4,0) in C1. The official figure shows 3.5, the average of positions three and four. The corresponding best-position calculation is three.

All values tied, then one value changes

Create AllTied using A1:D5. Enter 50 in A2:A5. Put =RANK.AVG(A2,$A$2:$A$5,0) in B2, =RANK.AVG(A2,$A$2:$A$5,1) in C2 and =RANK.EQ(A2,$A$2:$A$5,0) in D2. Fill through row 5.

Every B and C result is 2.5; each D result is 1. The average-rank total is 10. An average rank of 2.5 does not mean the data contain a measured value of 2.5.

Copy this sheet to OneHigher and change only A5 to 80. Descending B2:B5 becomes 3,3,3,1, ascending C2:C5 2,2,2,4, and best-position D2:D5 2,2,2,1. B and C still each total ten. The three unchanged 50s now share positions two through four in descending order.

Troubleshooting and interpretation

  • Keep the comparison range fixed when filling formulas. Ranking against a shrinking range changes the question.
  • Do not round fractional ranks to integers merely for presentation if later calculations need the average-position rule.
  • Ranking is not a stable ID or a tie-breaker. If one record must be chosen, specify a separate decision rule.
  • The short reference does not settle every text/Boolean inclusion rule, absent-target result, empty-only case or numeric-precision limit. These examples use present targets and explicit numeric ranges.

Use COUNTIF for tie-group counts, SUM for the total checks and RANK for the earlier best-position form.