Practical Financial Modelling : A Guide to Current Practice

Coercion

Sometimes the results of our calculations are in formats or layouts that we do not wish to use, and it would be helpful to change the appearance not through formatting but by forcing Excel to change the result. A simple example is that of the TRUE and FALSE operators generated by logical tests. We know that they have numeric values of 1 and 0 respectively and we can happily multiply against these values when using masks and other techniques. However, if we attempt to SUM a row containing TRUE and FALSE values, the result is zero, because Excel does not accept the logical operators as values. In order for this to work, we need to convert (or coerce) the operators by the simple operation of adding zero. For example,

=DebtRepayment>0

reads TRUE for periods in which repayments take place, and FALSE if they do not. If we need to return the number of loan repayments, a sum of this mask will not work. If we coerce the formula

=(DebtRepayment>0)+0

we now see a line of 1 and 0 values. The sum of this row will now be valid.

UNLIMITED FREE
ACCESS
TO THE WORLD'S BEST IDEAS

SUBMIT
Already a GlobalSpec user? Log in.

This is embarrasing...

An error occurred while processing the form. Please try again in a few minutes.

Customize Your GlobalSpec Experience

Category: Logic Gates
Finish!
Privacy Policy

This is embarrasing...

An error occurred while processing the form. Please try again in a few minutes.