Navigation: FXLV4SpeedTools > Array Sorting Functions >

VSORTB – Fast Dynamic Sort of a vertical range or array

 

 

 

VSORTB – Fast Dynamic Sort of a vertical range or array

This function 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. The output sequence may NOT be the same as EXCEL SORT for text items.
VSORTB is a non-volatile multi-threaded multi-cell array function.

VSORTB Syntax

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

The first parameter is required, all other parameters are optional.
The output from VSORTB will be a vertical sorted array. 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 be the number of columns in the input data.

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 Examples

VSORTB(A:C) will sort column A to C ascending, using the minimum of the number of rows in the used range and the number of rows in the multi-cell array formula that contains VSORTB. If the formula containing VSORTB is only entered into a single cell then VSORTB will return the number of rows in the used range.

VSORTB ({4,3,1,2}) returns a single row with 4 columns containing 4,3,1,2 (the input data is a single row).

VSORTB({4;3;1;2}) returns a column with 4 rows containing 1,2,3,4

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

 

 

 

Copyright © 2023 Decision Models Ltd