Value_If_True Argument in IF Function Is Not Optional (179086)
The information in this article applies to:
- Microsoft Excel 97 for Windows
- Microsoft Excel for Windows 95
- Microsoft Excel for Windows 5.0
- Microsoft Excel 98 Macintosh Edition
This article was previously published under Q179086 SYMPTOMS
If you enter a formula that uses the IF worksheet function, you may
receive one of the following error messages:
Error in formula.
-or-
The formula you typed contains an error.
CAUSE
This problem occurs if you completely omit the value_if_true argument in
the IF worksheet function, as in the following example:
The Help topic for the IF worksheet function indicates that the
value_if_true argument is optional; however, the argument is actually
required.
RESOLUTION
To prevent this problem from occurring, make sure that you include at
least a comma (,) after the logical_test argument in the IF function. For
example, this formula will be accepted by Microsoft Excel:
If possible, you should actually include valid value_if_true and/or
value_if_false arguments, as in the following examples:
Both arguments included
-----------------------
=IF(A1=0,"A1 is zero.","Al is not zero.")
Value_if_false argument omitted
-------------------------------
=IF(A1=0,"A1 is zero.")
Value_if_true argument omitted
------------------------------
=IF(A1=0,,"A1 is not zero.")
Modification Type: | Minor | Last Reviewed: | 8/17/2005 |
---|
Keywords: | kbdocerr kbinfo KB179086 |
---|
|