Microsoft KB Archive/63953

{| = Excel: Combining (Coercing) Different Data Value Types =
 * width="100%"|

Last reviewed: November 2, 1994

Article ID: Q63953

SUMMARY
When 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 ---                             --

=&quot;Number in A1 is &quot;&A1&&quot;.&quot;          Number in A1 is 10.

=&quot;Logical value in A2 is &quot;&A2&&quot;.&quot;   Logical value in A2 is TRUE.

=&quot;5&quot;+A1                             15

=A1+A2                              11
 * }