[Table of Contents] [docx version]

SpreadsheetML Reference Material - Table of Contents

RANK

Syntax:

RANK ( number , number-list [ , order ] )

Description: Computes the rank of a number in a list of numbers. RANK gives duplicate numbers the same rank. However, the presence of duplicate numbers affects the ranks of subsequent numbers.

Arguments:

Name

Type

Description

number

number

The number whose rank is to be found.

number-list

reference

Designates the list of numbers. Non-numeric values in this list are ignored.

order

number

Specifies how number is to be ranked. If zero or omitted, number is ranked as if the list were sorted in descending order. If order is any non-zero value, number is ranked as if the list were sorted in ascending order.

 

Return Type and Value: number – The rank of a number in a list of numbers.

[Example:

When the cells E1:I1 contain 7, 3.5, 3.5, 1, and 2

RANK(E2,E1:I1,1) results in 3
RANK(E2,E1:I1,1,0) results in 2
RANK(E2,E1:I1,1) results in 2
RANK(E1,E1:I1,1) results in 5, as the two 3.5 values both have a rank of 3; no value has rank 4.

end example]