
The function returns BLANK if the test condition is not satisfied. The condition tests a column formatted as text, list, time period, or date.
Syntax
IF (y) THEN (x) ELSE BLANK
where:
- y: the test condition
- x: a text, list, time period, or date result to return if TRUE
Format
Input Format | Output Format |
---|---|
x: Text, list item, time period, date | Matches the data format used by argument x |
Arguments
The function uses the following arguments:
- y: Expression that equates to a Boolean result
Constraints
The function has the following constraints:
- Result must be text, list, time period, or date-formatted.
Excel equivalent
- No Excel equivalent
Example
List-formatted result
In this example, the Health Plan result line item is list-formatted on the Health Plan list and the Single list item is returned, if the condition on the Health Coverage Points number-formatted line item is satisfied, otherwise Health Plan is left blank:
IF Health Coverage Points > 100 THEN Health Plan.Single ELSE BLANK
Time period-formatted result
In this example, the Product Launch Month result line item is time period-formatted and Mar 14 is returned if the condition on the Product R&D Score number-formatted line item is satisfied, otherwise Product Launch Month is blank:
IF 'Product R&D Score' < 100 THEN TIME.'Mar 14' ELSE BLANK
Date-formatted result
In this example, the Product Launch Date result line item is date-formatted and 01/03/2015 is returned if the condition on the Product R&D Score number-formatted line item is satisfied, otherwise Product Launch Date is blank:
IF 'Product R&D Score' < 100 THEN DATE(2015, 3, 1) ELSE BLANK
Note: Date formatting depends on your locale.
Text-formatted result
In this example, the Product Readiness result line item is text-formatted and Ready to Launch is returned if the condition on the Product R&D Score number-formatted line item is satisfied, otherwise Product Readiness is blank:
IF 'Product R&D Score' >= 100 THEN 'Ready to Launch' ELSE BLANK