Column: Swap Columns
Swap the position of two selected columns
colswap rng:= [Book1]Sheet1!(3,1);
Please refer to the page for additional option switches when accessing the x-function from script
Display Name |
Variable Name |
I/O and Type |
Default Value |
Description |
---|---|---|---|---|
Columns | rng |
Input/Output Range |
|
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. |
This X-Function swaps two selected columns.
// 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);