ERROR.TYPE Help Example Returns Incorrect Result (179379)
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 Q179379 SYMPTOMS
When you use the ERROR.TYPE function, the value you expect is not returned
according to the example in Help. If the cell that is being compared has
an error value, the example works properly; however, if this cell contains
a value (a number or text), the example in Help returns #N/A error rather
than the value of the cell you are testing.
CAUSE
This problem occurs when you evaluate a cell that does not match one of
the expected error types as in the following example:
A1: 5
A2: 10
A3: =IF(ERROR.TYPE(A1)=7, "Value is not available", A2)
Because A1 contains a value and not an error, the ERROR.TYPE function
returns a #N/A error instead of the condition specified in the IF
argument, which is the contents of cell A2.
WORKAROUND
To work around this problem, use the ISERROR function to determine if the
ERROR.TYPE function is returning an error. If the function returns an
error, return a value instead. For example, replace the formula in the
"Cause" section with the following formula:
=IF(ISERROR(ERROR.TYPE(A1)),A2,IF(ERROR.TYPE(A1)=7,
"Value is not available","")) STATUS
Microsoft has confirmed this to be a problem in the Microsoft products
listed at the beginning of this article.
Modification Type: | Minor | Last Reviewed: | 8/17/2005 |
---|
Keywords: | kbpending KB179379 |
---|
|