SetEntry

Enter a value or formula into a specified range in the workbook. Can also be used to clear cells or set the error value.

Overloads

Overload Name Description
Clear Clear the value of each cell.
Error Set the error value of each cell.
Formula Set the formula of each cell.
FormulaArray Set the formula array of each cell.
Logical Set the logical value of each cell.
Number Set the number value of each cell.
Text Set the text value of each cell.


Examples

CascadeSummary

Sets the values of Product.Level and Market.Level in each sheet.

Procedure  
  Method Overload ErrorHandlingMode  
    Argument Value Comment
AddLevels  
  SetEntry Number    
    SpecifySheetBy AllSheets  
    SheetSpec  
    Address Product.Level  
    CellByCell FALSE  
    ReverseOrder FALSE  
    MethodCondition TRUE  
    CellCondition =And(@DefinedNameExists(Market.Level),Not(@ValueLogical(IsSummarySheet)))  
    Entry @MbrLevel(@ValueText(Token.Product))  
  SetEntry Number    
    SpecifySheetBy AllSheets  
    SheetSpec  
    Address Market.Level  
    CellByCell FALSE  
    ReverseOrder FALSE  
    MethodCondition TRUE  
    CellCondition =And(@DefinedNameExists(Market.Level),Not(@ValueLogical(IsSummarySheet)))  
    Entry @MbrLevel(@ValueText(Token.Market))  

Clear

Clear the value of each cell.

Argument Description
SpecifySheetBy Select how to specify which worksheet to select while the method is being executed.
Specify one of the following values or an arbitrary value: <blank>SheetNameSheetNumberAllSheets
SheetSpec Specify the sheet-name or sheet-number, depending on SpecifySheetBy. If SpecifySheetBy is AllSheets then SheetSpec can be left empty.
Address The address of a range to select for the execution of the method.
CellByCell Whether to execute the method on a cell-by-cell basis, or on the range specified by the address.
ReverseOrder Whether to loop through the rows and columns from highest to lowest. Only applies when CellByCell is true.
MethodCondition If the result of method-condition expression resolves to FALSE, then the method is not executed.
Specify one of the following values or an arbitrary value: <blank>FALSETRUE
CellCondition If the result of the condition expression resolves to FALSE, then the current cell is skipped.
Specify one of the following values or an arbitrary value: <blank>FALSETRUE
TargetSpecifySheetBy Select how to specify for which sheet the TargetAddress applies.
Specify one of the following values or an arbitrary value: <blank>SheetNameSheetNumber
TargetSheetSpec Specify the sheet-name or sheet-number, depending on TargetSpecifySheetBy.
TargetAddress The address of the cell or range for which the Entry is entered. If TargetAddress is not specified, the Address is used as the target address.

Error

Set the error value of each cell.

Argument Description
SpecifySheetBy Select how to specify which worksheet to select while the method is being executed.
Specify one of the following values or an arbitrary value: <blank>SheetNameSheetNumberAllSheets
SheetSpec Specify the sheet-name or sheet-number, depending on SpecifySheetBy. If SpecifySheetBy is AllSheets then SheetSpec can be left empty.
Address The address of a range to select for the execution of the method.
CellByCell Whether to execute the method on a cell-by-cell basis, or on the range specified by the address.
ReverseOrder Whether to loop through the rows and columns from highest to lowest. Only applies when CellByCell is true.
MethodCondition If the result of method-condition expression resolves to FALSE, then the method is not executed.
Specify one of the following values or an arbitrary value: <blank>FALSETRUE
CellCondition If the result of the condition expression resolves to FALSE, then the current cell is skipped.
Specify one of the following values or an arbitrary value: <blank>FALSETRUE
TargetSpecifySheetBy Select how to specify for which sheet the TargetAddress applies.
Specify one of the following values or an arbitrary value: <blank>SheetNameSheetNumber
TargetSheetSpec Specify the sheet-name or sheet-number, depending on TargetSpecifySheetBy.
TargetAddress The address of the cell or range for which the Entry is entered. If TargetAddress is not specified, the Address is used as the target address.
Error The error.
Specify one of the following values or an arbitrary value: <blank>None#Null!#Div/0!#Value!#Ref!#Name?#Num!#N/A

Formula

Set the formula of each cell.

Argument Description
SpecifySheetBy Select how to specify which worksheet to select while the method is being executed.
Specify one of the following values or an arbitrary value: <blank>SheetNameSheetNumberAllSheets
SheetSpec Specify the sheet-name or sheet-number, depending on SpecifySheetBy. If SpecifySheetBy is AllSheets then SheetSpec can be left empty.
Address The address of a range to select for the execution of the method.
CellByCell Whether to execute the method on a cell-by-cell basis, or on the range specified by the address.
ReverseOrder Whether to loop through the rows and columns from highest to lowest. Only applies when CellByCell is true.
MethodCondition If the result of method-condition expression resolves to FALSE, then the method is not executed.
Specify one of the following values or an arbitrary value: <blank>FALSETRUE
CellCondition If the result of the condition expression resolves to FALSE, then the current cell is skipped.
Specify one of the following values or an arbitrary value: <blank>FALSETRUE
TargetSpecifySheetBy Select how to specify for which sheet the TargetAddress applies.
Specify one of the following values or an arbitrary value: <blank>SheetNameSheetNumber
TargetSheetSpec Specify the sheet-name or sheet-number, depending on TargetSpecifySheetBy.
TargetAddress The address of the cell or range for which the Entry is entered. If TargetAddress is not specified, the Address is used as the target address.
Entry The entry.

FormulaArray

Set the formula array of each cell.

Argument Description
SpecifySheetBy Select how to specify which worksheet to select while the method is being executed.
Specify one of the following values or an arbitrary value: <blank>SheetNameSheetNumberAllSheets
SheetSpec Specify the sheet-name or sheet-number, depending on SpecifySheetBy. If SpecifySheetBy is AllSheets then SheetSpec can be left empty.
Address The address of a range to select for the execution of the method.
CellByCell Whether to execute the method on a cell-by-cell basis, or on the range specified by the address.
ReverseOrder Whether to loop through the rows and columns from highest to lowest. Only applies when CellByCell is true.
MethodCondition If the result of method-condition expression resolves to FALSE, then the method is not executed.
Specify one of the following values or an arbitrary value: <blank>FALSETRUE
CellCondition If the result of the condition expression resolves to FALSE, then the current cell is skipped.
Specify one of the following values or an arbitrary value: <blank>FALSETRUE
TargetSpecifySheetBy Select how to specify for which sheet the TargetAddress applies.
Specify one of the following values or an arbitrary value: <blank>SheetNameSheetNumber
TargetSheetSpec Specify the sheet-name or sheet-number, depending on TargetSpecifySheetBy.
TargetAddress The address of the cell or range for which the Entry is entered. If TargetAddress is not specified, the Address is used as the target address.
Entry The entry.

Logical

Set the logical value of each cell.

Argument Description
SpecifySheetBy Select how to specify which worksheet to select while the method is being executed.
Specify one of the following values or an arbitrary value: <blank>SheetNameSheetNumberAllSheets
SheetSpec Specify the sheet-name or sheet-number, depending on SpecifySheetBy. If SpecifySheetBy is AllSheets then SheetSpec can be left empty.
Address The address of a range to select for the execution of the method.
CellByCell Whether to execute the method on a cell-by-cell basis, or on the range specified by the address.
ReverseOrder Whether to loop through the rows and columns from highest to lowest. Only applies when CellByCell is true.
MethodCondition If the result of method-condition expression resolves to FALSE, then the method is not executed.
Specify one of the following values or an arbitrary value: <blank>FALSETRUE
CellCondition If the result of the condition expression resolves to FALSE, then the current cell is skipped.
Specify one of the following values or an arbitrary value: <blank>FALSETRUE
TargetSpecifySheetBy Select how to specify for which sheet the TargetAddress applies.
Specify one of the following values or an arbitrary value: <blank>SheetNameSheetNumber
TargetSheetSpec Specify the sheet-name or sheet-number, depending on TargetSpecifySheetBy.
TargetAddress The address of the cell or range for which the Entry is entered. If TargetAddress is not specified, the Address is used as the target address.
Entry The entry.

Number

Set the number value of each cell.

Argument Description
SpecifySheetBy Select how to specify which worksheet to select while the method is being executed.
Specify one of the following values or an arbitrary value: <blank>SheetNameSheetNumberAllSheets
SheetSpec Specify the sheet-name or sheet-number, depending on SpecifySheetBy. If SpecifySheetBy is AllSheets then SheetSpec can be left empty.
Address The address of a range to select for the execution of the method.
CellByCell Whether to execute the method on a cell-by-cell basis, or on the range specified by the address.
ReverseOrder Whether to loop through the rows and columns from highest to lowest. Only applies when CellByCell is true.
MethodCondition If the result of method-condition expression resolves to FALSE, then the method is not executed.
Specify one of the following values or an arbitrary value: <blank>FALSETRUE
CellCondition If the result of the condition expression resolves to FALSE, then the current cell is skipped.
Specify one of the following values or an arbitrary value: <blank>FALSETRUE
TargetSpecifySheetBy Select how to specify for which sheet the TargetAddress applies.
Specify one of the following values or an arbitrary value: <blank>SheetNameSheetNumber
TargetSheetSpec Specify the sheet-name or sheet-number, depending on TargetSpecifySheetBy.
TargetAddress The address of the cell or range for which the Entry is entered. If TargetAddress is not specified, the Address is used as the target address.
Entry The entry.

Text

Set the text value of each cell.

Argument Description
SpecifySheetBy Select how to specify which worksheet to select while the method is being executed.
Specify one of the following values or an arbitrary value: <blank>SheetNameSheetNumberAllSheets
SheetSpec Specify the sheet-name or sheet-number, depending on SpecifySheetBy. If SpecifySheetBy is AllSheets then SheetSpec can be left empty.
Address The address of a range to select for the execution of the method.
CellByCell Whether to execute the method on a cell-by-cell basis, or on the range specified by the address.
ReverseOrder Whether to loop through the rows and columns from highest to lowest. Only applies when CellByCell is true.
MethodCondition If the result of method-condition expression resolves to FALSE, then the method is not executed.
Specify one of the following values or an arbitrary value: <blank>FALSETRUE
CellCondition If the result of the condition expression resolves to FALSE, then the current cell is skipped.
Specify one of the following values or an arbitrary value: <blank>FALSETRUE
TargetSpecifySheetBy Select how to specify for which sheet the TargetAddress applies.
Specify one of the following values or an arbitrary value: <blank>SheetNameSheetNumber
TargetSheetSpec Specify the sheet-name or sheet-number, depending on TargetSpecifySheetBy.
TargetAddress The address of the cell or range for which the Entry is entered. If TargetAddress is not specified, the Address is used as the target address.
Entry The entry.