Skip to main content

SETVALUE

Writes a given value into target cell, if specified condition evaluates to true.

Syntax

=SETVALUE([Condition], Value, TargetCell [, OverwriteFormula])

Arguments

NameDescription
ConditionOptional. Condition to check for action. Defaults to FALSE if no condition is given.
ValueValue to write to target cell, if condition evaluates to TRUE.
TargetCellCell to put value into.
OverwriteFormulaOptional. Set to TRUE remove any cell formula. Defaults to FALSE.

Return Value

TRUE

Example

FunctionResultComment
=SETVALUE(21, 42, B1)TRUEWill put value 42 in cell B1, but keeps possible cell formula
=SETVALUE(21, 42, B1, TRUE)TRUESame as before, but overwrites possible cell formula so that 42 is returned on subsequent App steps
=SETVALUE(, 42, B1)TRUEDoes nothing because no condition is specified