Navigation: FXLV4SpeedTools > Array Sorting Functions >

VSORTB.INDEX – Fast Index Sort of a vertical range or array

 

 

 

VSORTB.INDEX – Fast Index Sort of a vertical range or array

This function index sorts a vertical array or a range containing one or more columns. The sort is case-sensitive and is done using a binary collating sequence which is dependent on the positions of the characters in the code-page ignoring Excel’s rules for sorting apostrophes and hyphens. The output sequence may NOT be the same as EXCEL SORT for text items.

VSORTB is a non-volatile multi-threaded array function.

VSORTB.INDEX Syntax

VSORTB.INDEX(theInputData, SortColumn1, SortColumn2, … SortColumn15) )

The first parameter is required, all other parameters are optional.

The output from VSORTB.INDEX will be a vertical sorted array of index numbers. The index numbers give the relative position in the input data of the nth item in the sorted output, rather than the sorted output itself.
The number of rows sorted and output will be the smaller of the number of rows in the input data and the number of rows in the used range.

The number of columns will always be 1.

TheInputData (required)

The data to be sorted, given as a vertical array of constants or a calculated range or a range. The range or array can contain as many columns as required.

SortColumn1 … SortColumn15 (optional)

Gives the index column number(s) of the columns to be used as sort keys. Up to 15 sort keys can be specified.
Positive column numbers will be sorted ascending and negative column numbers will be sorted descending. You can have both positive and negative numbers in the same function call.
1 denotes the first column in the input data.
If all Sort Column parameters are omitted all columns in the input data will be used as ascending sort keys.

VSORTB.INDEX Examples

VSORTB.INDEX({B;b;a;A}) returns a column with 4 rows containing 3, 4, 2, 1  (first is the 3rd in the input data (“a”), then the 4th (“A”), then the 2nd (“b” then the 1st (“A”)) (case-sensitive collate means lower case before upper case so the a comes before A).

VSORTB.INDEX(A1:C100000,1,-2) will return 100000 rows by 1 column of index numbers sorted ascending on column A and descending on column B.

 

 

 

Copyright © 2024 Decision Models Ltd