Excel: Combining (Coercing) Different Data Value TypesLast reviewed: November 2, 1994Article ID: Q63953 |
SUMMARYWhen Microsoft Excel evaluates a formula and encounters different data types returned by expressions in the formula, it changes the data type returned by one expression to match the other, based on the operator between the two expressions. Below are some simple worksheet examples of data type coercion among text, number, and logical value types in formulas. Assume cell A1 contains the number 10 and cell A2 contains the logical value TRUE.
Formula Value Returned ------- -------------- ="Number in A1 is "&A1&"." Number in A1 is 10. ="Logical value in A2 is "&A2&"." Logical value in A2 is TRUE. ="5"+A1 15 =A1+A2 11 |
KBCategory: kbother
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |