SORTV (sort)

<< Click to Display Table of Contents >>

SORTV (sort)

Syntax:

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

Description:

This returns a vector that contains the values of the given one-dimensional cell range in sorted order.

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

Range is the one-dimensional cell range or array that contains 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., sort terms where the first letter is lowercase before terms that begin with the same uppercase letter.

If you use the optional argument Data, the function returns the data from Data as the result rather than the data from Range. Data must be of exactly the same size as Range.

This is useful if, for example, you create a worksheet 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, you will obtain 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 does not exist in Microsoft Excel. If you save a document in Excel format, all calculations using this function will be replaced with their current result as a fixed value.

See also:

SORTM, section Sorting cells