Spread 8.0 Documentation
IF
Support Options
Formula Reference > Built-In Functions > IF

Glossary Item Box

IF


Name

Comparison

Description

Returns a value based on a logical value.

Syntax

IF(value1, value2, value3)

Remarks

value1 must be or evaluate to numeric data, where nonzero values indicate True, and a value of zero indicates False. If value1 is nonzero (or True), then value2 is returned. If value1 is zero (or False), then value3 is returned. value1 can contain one of the relational operators: greater than (>), less than (<), equal to (=), or not equal to (<>). The third argument is optional. If the argument is not specified, the Boolean value FALSE is used.

See also AND, FALSE, NOT, OR, and TRUE.

Data Type

Accepts numeric (boolean) data. Returns any data type. For more information, see Data Type for Each Cell Type.

Example

IF(R1C2>65,1000,2000)
IF(A3<>2000,1900,2000)
IF(C4,B2,B4)
IF(1>2,5,10)=10
fpSpread1.Formula = "IF(1<2,""dogs"",""cats"")" equals "dogs"

Copyright © GrapeCity, inc. All rights reserved.