Repository navigation
Add RANK.AVG function (HF-420) - #1787
Open
marcin-kordas-hoc wants to merge 3 commits into
Open
marcin-kordas-hoc wants to merge 3 commits into
marcin-kordas-hoc wants to merge 3 commits into
Conversation
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
hyperformula-docs | 905872a | Commit Preview URL Branch Preview URL |
Oct 08 2026, 04:10 AM |
Performance comparison of head (905872a) vs base (3a9c34b) |
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…og placement Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
marcin-kordas-hoc
force-pushed
the
feat/hf-420-rank-avg
branch
from
October 8, 2026 04:07
2593c40 to
905872a
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #1787 +/- ##
========================================
Coverage 97.26% 97.26%
========================================
Files 203 203
Lines 16022 16033 +11
Branches 3555 3558 +3
========================================
+ Hits 15583 15594 +11
Misses 431 431
Partials 8 8
🚀 New features to boost your workflow:
|
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds the
RANK.AVGfunction (HF-420).RANK.AVG(number, ref, [order])returns the rank ofnumberwithinref. Tied values get the average of the ranks they span.orderomitted or0ranks descending, any other value ascending.refcount, including typed numbers (percentages, dates, currency). Text, booleans, empty cells and numeric strings are ignored.#N/Awhennumberis not found,#VALUE!when it cannot be coerced to a number, and propagates an error found inref.MedianPlugin, with a metadata catalogue entry, translations for all built-in languages (English names kept, as no localized name was confirmed), and a CHANGELOG entry.Behaviour check against Excel
21 formulas were evaluated in Excel Online (MS Graph live session) and in HyperFormula; all 21 results are identical; numbers are compared exactly, as Excel does for ranking (with
A1 = 0.1+0.2andB1 = 0.3,RANK.AVG(0.3, A1:C1)is 3 in both, measured, and covered by a test). They cover ties (including three-way ties, both orders), booleans/text/numeric strings inref, percentage, date and currency cells, errors inref, 2D and single-cell ranges, an absent number and a textnumber.Tests
Paired tests branch:
feat/hf-420-rank-avgin the tests repository (49 tests). Full local run on this head: 503 suites, 6282 passed, 3 skipped.🤖 Generated with Claude Code
Note
Low Risk
Additive statistical function following existing plugin/metadata/i18n patterns; no changes to core engine or security-sensitive paths.
Overview
Adds Excel-compatible
RANK.AVG(number, ref, [order]), which returns a value’s rank in a range and uses the average rank for ties. Optionalorderdefaults to descending (0or omitted); any other value ranks ascending.The evaluator lives in
MedianPlugin(rankAvg): numeric cells fromrefare collected viamanyToExactNumbers,#N/Awhen the number isn’t in the range, and rank isranksBefore + (ties + 1) / 2. Wiring includes statistical function metadata,RANK.AVGin proprietary license capabilities, a CHANGELOG entry, and the nameRANK.AVGin all built-in language packs (no localized aliases yet).Reviewed by Cursor Bugbot for commit 905872a. Bugbot is set up for automated code reviews on this repo. Configure here.