# RANK.AVG Function

> Rank a number in a list with RANK.AVG in TX Sheet Control: equal numbers share the average of their ranks, descending or ascending order and #N/A.

- **Product:** TX Sheet Control
- **Section:** Documentation
- **Kind:** Function
- **Path:** TX Sheet Control > API Reference > Formula Functions > RANK.AVG Function
- **227 words**
- **Web URL:** https://docs.textcontrol.com/tx-sheet-control/reference/formula-functions/rank-avg/
- **LLMs URL:** https://docs.textcontrol.com/tx-sheet-control/reference/formula-functions/rank-avg/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-sheet-control/reference/formula-functions/rank-avg/llms-full.txt

---

Return the rank of a number in a list of numbers, with the average rank for equal numbers. `number` is the number to rank and `ref` the list; `order` 0 or omitted ranks in descending order, with the largest number as 1, and any other value in ascending order. Equal numbers share the average of their ranks, so `RANK.AVG(2,{1,2,2,3})` returns 2.5. A number that isn't in the list returns `#N/A`.

### Syntax

```text
RANK.AVG(number, ref, order)
```

Category: Statistics. Minimum arguments: 2. Maximum arguments: 3.

Available for supported offline calculation.

### Examples

```text
=RANK.AVG(3,A1:A5)
```

When A1:A5 holds the values 1 to 5, the formula returns 3: 3 is the third largest value.

Cell and range examples require appropriate input values in the referenced cells. Handle invalid arguments, formula errors and array and spill constraints.

### See Also

- [Formulas](https://docs.textcontrol.com/tx-sheet-control/spreadsheets/formulas/llms-full.txt)
- [Custom Functions and Formula Data](https://docs.textcontrol.com/tx-sheet-control/spreadsheets/custom-functions/llms-full.txt)

---

## Nearby

- **Previous:** [RANK Function](https://docs.textcontrol.com/tx-sheet-control/reference/formula-functions/rank/llms-full.txt)
- **Next:** [RANK.EQ Function](https://docs.textcontrol.com/tx-sheet-control/reference/formula-functions/rank-eq/llms-full.txt)
