Spreadsheet.ShiftVariables
This function shifts the specified range of variables in the spreadsheet.
| Syntax | Parameters | Return Value |
|---|---|---|
Sub Spreadsheet.ShiftVariables( _
Var As Variant, _
Lag As Integer)
|
The range of variables to shift. Type: Variant
Integer value that specifies the number of positions that the variables shift be shifted. Type: Integer |
This function does not return a value. |
SVB Example
Shifting variables:
Option Base 1
Option Explicit
Sub Main
Dim spr As Spreadsheet
'assigns the active spreadsheet to the object spr
Set spr = ActiveSpreadsheet
'shifts variables 1-3 in the spreadsheet up by 5
'in order to shift the range of variables downward, change
'the lag parameter from -5 to 5
spr.ShiftVariables("1-3",-5)
End Sub