When...
Use this function to carry out a set of instructions each time the contents of a cell match a condition.
Do not confuse the When function with the If function:
Function | Description |
---|---|
When | To carry out a set of instructions each time the contents of an intersection in a DataArea match a condition. |
If | To carry out a set of instructions if any of the intersections in a DataArea matches a condition. In this case, the IF function carries out the instructions for all the intersections in that DataArea. (The IF function looks for a match of the condition and then applies the instructions to each and every intersection of the DataArea regardless of whether the remaining intersections in the DataArea match the condition.) |
where:
- Condition is a test to determine if a relationship is true or false. Your system tests the condition for every value of that symbol. When Condition is true, your system carries out Instructions.
- Instructions is an instruction that your system carries out if Condition is true.
- Instructions2 is an instruction that your system carries out if Condition is false.