SORTV (sort)

<< Click to Display Table of Contents >>

SORTV (sort)

Syntax:

SORTV(Range [, Descending] [, Mode] [, Data])

Description:

Returns a vector containing the values of the given one-dimensional cell range, in sorted order.

Unlike the SORTM function, SORTV is applicable to one-dimensional cell ranges (vectors) only. These are ranges that cover either only one row or only one column.

Range is the cell range or array containing the data to be sorted.

Descending (optional) lets you specify the sort order:

FALSE or omitted: Ascending order

TRUE: Descending order

Mode (optional) is a logical value that lets you specify if PlanMaker should distinguish between uppercase and lowercase letters:

FALSE or omitted: Ignore case of letters

TRUE: Distinguish between uppercase and lowercase letters, i.e., place text strings starting with a lowercase letter above text strings starting with an uppercase letter.

If you use the optional argument Data, the function does not return the data from Range as a result, but the data from Data. Data must be of exactly the same size as Range.

This is useful if, for example, you create a table that contains a column with the names of athletes and a column with their scores next to it. If you enter the column with their scores as the Range here, but the column with their names as the Data, the result is a list of names sorted by scores.

Note:

Formulas using this function have to be entered as an array formula. For more information, see Working with arrays.

Example:

SORTV({4;2;3}) returns {2;3;4}

SORTV({4;2;3}, TRUE) returns {4;3;2}

SORTV({4,2,3}) returns {2,3,4}

Compatibility notes:

This function is not supported by Microsoft Excel. If you save a document in Excel format, all calculations using this function will be replaced by their last result as a fixed value.

See also:

SORTM, section Sorting cells