IF

 

The statement acts as an if-then-else calculation,

 

Enter the condition in the format =IF(condition, true-expression, false-expression). The statement acts as an if-then-else calculation, for example:

 

=IF(("@DECOR@"="D"), 100, 200)

 

Evaluates to 100 if @DECOR@ is"D" otherwise it evaluates to 200.

 

The condition expression, true-expression and false-expression can all be formula, allowing nesting. For example:-

 

=IF(("@DECOR@"="D"), 100, IF(("@DECOR@"="E"), 300, 200))

 

This is evaluated as 'if @DECOR@="D" then width = 100, else if @DECOR@="E" then width = 300, else width = 200'

 

=IF(&FORM1&>500, 10, 20)

 

evaluates to 10 if the result of &FORM1& is greater than 500, otherwise it is 20

 

If the condition-expression evaluates to any number other than 0 then this is taken to be TRUE.

 

The following conditional statements are allowed

 

> greater than

< less than

= equal to

>= greater than or equal to

<= less than or equal to

<> not equal to

!: does not contain

-> starts with

<- ends with