RANDOM(OutBlock As String, Columns As Integer, Rows As Integer, type As _RANDOM_Type_enum, Seed As Double, Parameter1, [Parameter2 As Double], [Parameter3 As Double], [Parameter4 As Double], [Parameter5 As Double]
Parameters
OutBlock Upper-left cell of the output cells
Columns A value indicating the number of random-number sets to generate; default is the number of columns in OutBlock
Rows A value indicating the number of rows of random numbers to generate for each column
6 Indicates patterned distribution
Seed Starting number for the random-number-generation algorithm
LowerBound A value indicating the lower bound on the set of numbers to generate
UpperBound A value indicating the upper bound on the set of numbers to generate
Step Increment value between LowerBound and UpperBound
RepeatNumber A value indicating the number of times to repeat each value
RepeatSequence A value indicating the number of times to repeat each sequence of values
Description
{RANDOM} generates cells of random values drawn from a selected distribution. It is equivalent to the Random Number analysis tool. {RANDOM} has a different format for the following distribution types:
Uniform Every value has an equal probability of being selected.
Normal Has the qualities of a symmetrical, bell-shaped curve.
Bernoulli Has two possible outcomes, failure or success, represented by 0 and 1.
Binomial Represents the distribution of successful outcomes in a given number of independent Bernoulli trials.
Poisson The distribution of values in any interval depends on the length of the interval and the constant Lambda, the expected number of occurrences in an interval
Patterned A pattern of repeated values and sequences.
Discrete Every value in designated cells has a specified probability of being selected (the cumulative probabilities equal 1).
When the Distribution argument equals 7, {RANDOM} generates random values drawn from a discrete distribution.
Parameters
OutBlock Upper-left cell of the output cells
Columns A value indicating the number of random-number sets to generate; default is the number of columns in OutBlock
Rows A value indicating the number of rows of random numbers to generate for each column
7 Indicates discrete distribution
Seed Starting number for the random-number-generation algorithm
InBlock One or more numeric cell values representing the input cells, which contain a range of values and their probabilities, each in a separate column
{RANKPERC}
Syntax
RANKPERC(InBlock As String, OutBlock As String, [Grouped As String], [Labels_ As _RANKPERC_Labels__enum])
{RECALC} causes Quattro Pro to recalculate a specified portion of the notebook in a row-by-row order. This is different from normal recalculation, where Quattro Pro recalculates the entire notebook in natural order; that is, before a formula calculates, each cell it references is recalculated first.
With the optional Condition argument, you can tell Quattro Pro to recalculate formulas in cells repeatedly until the specified condition is met. You can also supply Iteration# to specify the maximum number of times to recalculate formulas trying to satisfy Condition. To use Iteration#, Condition must also be supplied.
{RECALC} is useful for rapid recalculation of specified parts of a notebook, particularly when the notebook is so large that global recalculations would significantly slow your work.
{RECALC} overrides the recalculation method specified for the notebook, enforcing row-by-row recalculation. If all the formulas reference only cells above, or to the left in the same row, the notebook will be correctly calculated. If there are references to cells to the left and below, you must use {RECALCCOL}. If there are references to cells below or to the right in the same row as your formula, you must use {CALC} to recalculate the entire notebook.
{RECALC} displays the results of recalculation.
If there are formulas within the cells being recalculated that depend on formulas outside of the cells, they might not evaluate correctly. Make sure Location encompasses all the cells referenced by formulas within the cells.
Parameters
Location Cells to recalculate
Condition Condition to be met before recalculation is halted (optional)
Iteration# Maximum number of times to recalculate Location trying to meet Condition (optional)
{RECALCCOL}
Syntax
RecalcCol(Block As String, [Condition], [Iteration As Integer])
{RECALCCOL} recalculates the specified portion of a notebook in column-by-column order. It is similar to {RECALC}, which recalculates row by row. See {RECALC} for information on when {RECALCCOL} is appropriate and when you need to use {CALC} instead.
Parameters
Location Cells to recalculate
Condition Condition to be met before recalculation is halted (optional)
Iteration# Maximum number of times to recalculate Location trying to meet Condition (optional)
{RefreshMenuBar}
Syntax
RefreshMenuBar()
PerfectScript Syntax
RefreshMenuBar ()
Description
Refreshes the menu bar.
{REGRESS}
Syntax
REGRESS(InBlockY As String, InBlockX As String, YIntZero_ As _REGRESS_YIntZero__enum, Labels_ As _REGRESS_Labels__enum, Confidence As Double, SumOutBlock As String, Residuals_ As _REGRESS_Residuals__enum, StdResiduals_ As _REGRESS_StdResiduals__enum, [ResidualOutBlock As String], [ProbOutBlock As String])
{REGRESS} performs multiple linear regression analysis. {REGRESS} is equivalent to the Advanced Regression analysis tool.
Parameters
InBlockY Input cells containing a single column of y values (the dependent variables)
InBlockX Input cells containing one or more columns of x values (the independent variables)
YIntZero 1 if the y-intercept is 0 (the line of regression passes through the origin); 0 if the y-intercept is not 0
Labels 1 if labels are located in the first column or row of the InBlockY and InBlockX; 0 if the input selections do not contain labels
Confidence A value indicating the confidence level to apply to the regression
SumOutBlock Upper-left cell of the output cells for the summary table (allow at least seven columns)
Residuals 1 or 0; if 1, includes residuals in the output table
StdResiduals 1 or 0; if 1, includes standardized residuals in the output table
ResidualOutBlock Upper-left cell of the output cells for the residuals table (allow at least four columns)
ProbOutBlock Upper-left cell of the output cells for the probabilities table (allow at least two columns)
{Regression}
Syntax
{Regression.Option}
PerfectScript Syntax
Regression_Dependent (Block:String)
Regression_Go ()
Regression_Independent (Block:String)
Regression_Output (Block:String)
Regression_Reset ()
Regression_Y_Intercept (Mode:String)
Description
{Regression} performs a regression analysis to show the relationship between a set of independent variables and a dependent variable.
{Regression.Dependent} indicates the dependent-variable cells. {Regression.Independent} defines the independent variables. In {Regression.Independent}, Block can be noncontiguous with one variable to a column. The dependent and independent selections must all have the same number of rows.
{Regression.Output} indicates where to store the table of regression results. {Regression.Y_Intercept} specifies whether to compute the Y-intercept, or set it to zero. You can use {Regression.Reset} to clear all settings. Use {Regression.Go} after the other command equivalents to perform the regression analysis. If data changes within the independent or dependent data selections, use {Regression.Go} again to calculate a new regression table.
You can use {Regression?} or {Regression!} to display the Linear Regression dialog box. {Regression?} lets you manipulate the dialog box, whereas {Regression!} relies on the macro to manipulate it.
Example
The following macro sets these data selections: Independent, B2..D16; Dependent, F2..F16. The last statement performs the regression analysis and stores the results in the cells with upper-left cell H2.
{Regression.Independent A:B2..A:D16}
{Regression.Dependent A:F2..A:F16}
{Regression.Output A:H2}
{Regression.Go}
Options
{Regression.Dependent Block} Specifies the cells (partial column) containing independent variable (y-axis) data
{Regression.Go} Performs the regression analysis
{Regression.Independent Block} Specifies cells containing up to 150 columns of independent variable (x-axis) data
{Regression.Output Block} Specifies the cells where results will be written
{Regression.Reset} Clears all regression settings
{Regression.Y_Intercept Compute|Zero} Specifies whether to force the y-intercept value to zero or whether to compute it
{REQUEST} gets information specified by DataToReceive from applications that support Dynamic Data Exchange (DDE). This information is stored in DestBlock. DataToReceive is a string representing the location of the data to receive in the other application. In Quattro Pro, this could be cells such as A2..A7 or a property such as "(Application.Display)". If requesting a property, the property must be enclosed in parentheses.
If your conversation is not within a specific topic (in other words, you opened the channel using the command {INITIATE AppName,"System",DDEChannel}), you can use the following strings in DataToReceive, depending on the application:
Arguments for DataToReceive
String Purpose
"SysItems" A listing of all strings you can use with DataToReceive. You can use this command first to view other choices offered by AppName.
"Topics" A listing of all topics open. For example, a list of open documents under Word for Windows.
"Status" The current status of the application. For example, READY in Excel or EDIT in Quattro Pro when a cell is being edited.
"Formats" A list of all Clipboard formats supported by the application or DDE link.
"Selection" A list of all items currently selected in the application. For example, in Excel cells A3..A47 could be selected.
Example
This macro gets the major and minor version numbers of GroupWise, which is already running.
DDEChannel DDE channel number of the application to receive data from
DataToReceive Information to receive from the application
DestBlock Cells to store the data received into
{RESIZE}
Syntax
Resize(x As Double, y As Double, NewWidth As Double, NewHeight As Double, [VertFlip_ As _Resize_VertFlip__enum], [HorizFlip_ As _Resize_HorizFlip__enum])
{RESIZE} resizes all selected objects in the active window (dialog or chart window).
Parameters
x and y XY coordinates of the new upper-left corner, in pixels
NewWidth The new width, in pixels, of the object or group
NewHeight The new height, in pixels, of the object or group
VertFlip? 1 if the object or group is flipped vertically from its previous position
HorizFlip? 1 if the object or group is flipped horizontally from its previous position
{ResizeToSame}
Syntax
ResizeToSame()
Description
{ResizeToSame} lets you resize selected objects in the dialog window to the same size as the first object selected.
{RestrictInput}
Syntax
{RestrictInput.Option}
PerfectScript Syntax
RestrictInput_Enter (Block:String)
RestrictInput_Exit ()
Description
{RestrictInput.Enter} enters INPUT mode and stays under macro control until {PAUSEMACRO} is used or {RestrictInput.Exit}, which exits INPUT mode.
{RestrictInput.Option} confines selector movement to specific cells of unprotected cells.
You can use {RestrictInput?} or {RestrictInput!} to display the Restrict Input dialog box. {RestrictInput?} lets you manipulate the dialog box, whereas {RestrictInput!} relies on the macro to manipulate it.
Options
{RestrictInput.Enter Block} Enters INPUT mode and stays under macro control
{RestrictInput.Exit} Any operation that ends INPUT mode
{ReturnErrorValue}
Syntax
ReturnErrorValue()}
PerfectScript Syntax
ReturnErrorValue ()
Description
Reinstates the ability for Quattro Pro to return a specific error value, if one is warranted.
{ROWCOLSHOW}
Syntax
RowColShow(Block As String, Show_ As _RowColShow_Show__enum, Row_ As _RowColShow_Row__enum, FirstPane_ As _RowColShow_FirstPane__enum)
{ROWCOLSHOW} lets you hide or reveal rows and columns (it is equivalent to the cell property Reveal/Hide). Show? specifies whether to reveal (1) or hide (0). Row or Col specifies whether to affect rows (1) or columns (0). Block contains the rows or columns to affect. FirstPane? is used when the active window is split into panes. To affect the columns or rows in the left or top pane, set FirstPane? to 1; to affect rows or columns in the right or bottom pane, set FirstPane? to 0.
Example
{ROWCOLSHOW A:A..B,1,0,1} reveals columns A and B on sheet A.
{ROWCOLSHOW A:1..7,0,1,1} hides rows 1 through 7 on sheet A.
{ROWCOLSHOW A:1..7,1,1,0} reveals rows 1 through 7 on sheet A. If the window is split, the rows are revealed in the right or bottom pane.
Parameters
Block Cells containing rows or columns to hide or show
Show? 1 to reveal rows or columns; 0 to hide rows or columns
Row or Col 1 to reveal or hide a row; 0 to reveal or hide a column
FirstPane? 1 to affect rows or columns in left or top window pane; 0 to affect them in the right or bottom window pane
{ROWHEIGHT}
Syntax
RowHeight(Block As String, FirstPane_ As _RowHeight_FirstPane__enum, Reset_ As _RowHeight_Reset__enum, Size As Double)
{ROWHEIGHT} provides two ways to change the height of a row or rows (it is equivalent to the cell property Row Height). The rows to change are specified by Block. FirstPane? is used when the active window is split into panes. To resize the rows in the left or top pane, set FirstPane? to 1; to resize the rows in the right or bottom pane, set FirstPane? to 0.
Set/Reset specifies how to change the height. To set a row height, use this syntax: {ROWHEIGHT Block, FirstPane?, 0, Size}
Size is the new row height, in twips. The maximum height is ten inches (14,400 twips).
To reset a row to the default height (determined by font sizes in the row), use this syntax: {ROWHEIGHT Block, FirstPane?, 1}
Example
{ROWHEIGHT A:1..A:2,1,0,1440} sets the height of rows 1 and 2 (on sheet A) to one inch (1,440 twips).
{ROWHEIGHT A:1..A:2,0,0,2160} sets the height of rows 1 and 2 (on sheet A) to one and a half inches (2,160 twips). If the window is split, the top or left pane is affected.
{ROWHEIGHT A:5,1,1} resets the height of row 5 (on sheet A) to the default height.
Parameters
Block Cells containing rows to resize
FirstPane? 1 to resize rows in left or top window pane; 0 to resize rows in right or bottom window pane
Set/Reset 0 to set the row height; 1 to reset the row height
Size New height (in twips) if setting size; not needed if resetting size