2.2.3.12 colswap


Menu Information

Column: Swap Columns

Brief Information

Swap the position of two selected columns

Command Line Usage

colswap rng:= [Book1]Sheet1!(3,1);

X-Function Execution Options

Please refer to the page for additional option switches when accessing the x-function from script

Variables

Display
Name
Variable
Name
I/O
and
Type
Default
Value
Description
Columns rng

Input/Output

Range

<active>
Specifies the columns to be swapped. If the selected range has more than two columns, the leftmost column and the rightmost column will be swapped.

Description

This X-Function swaps two selected columns.

Examples

// This function will swap the positions of the designated columns
// Here we will reverse the order of columns ABCDE to EDCBA
newbook;
wks.ncols = 5;

colswap (1,5);
colswap (2,4);