Let


Contents

Description

Minimum Origin Version Required: 2021

Similar to MS Excel's LET() function. Assign values to variables, for up to 39 variable-value pairs, for use in expression. Optional $ is used is used when returning strings.

Syntax

Let(var1,val1[,var2,val2,]...[,var39, val39], expression)[$]

Parameters

var1 ... var39

the variable name paired with var1 (variable 1) through var39 (variable 39)

val1 ... val39

the value(s) paired with var1 through var39

expression

expression to be evaluated using var1 ... var39

$

use when returning a string

Return

Return the result of expression.

Example

newbook;
wks.nCols = 4;
patternT irng:=1 text:="A B C" mode:=random;
patternT irng:=2 text:="A B C" mode:=random;
csetvalue col:=col(C) formula:="LET(t,if(A$==B$,1,0/0),t*500)";

See Also