EXCEL Formulas
Logic Errors

A logic error is a "real world" mistake that EXCEL is quite happy to calculate for you. Your syntax is great. You just aren't making sense, given the context of the problem you are trying to solve.

Accidental logic error when trying to type in the formula =5+3-2/
6*12
Accidental logic error when trying to type in the formula =5+3-2/6*12

In this example, the user probably did not mean to type an equal sign between the 3 and the 2. But it so happens that EXCEL can do this trick!

Note: the example illustrates an unintended result. But the outcome is explained below, for the curious.

The first = sign says "this is a formula". But once that is established, the next transforms the formula into a comparison between (5+3) and (2/6*12), asking if those two equations are equal. They aren't, so the whole thing evaluates to a value of the logical data type which expresses the answer to the question. In this case: FALSE, because (5+3) is not equal to (2/6*12).

Using the wrong number (accidentally).

The labels in row one suggest this user wanted to see 10% of the value in A2 appear in C2. If so, this is a logic error.

Per cent -- one wizard too many?

This error is easy to commit by mistake. Type a 10 into B2. Then click on the % button in the format tool bar. You will see what you get here. Why? The % button is too clever (or too stupid I suppose, depending on your point of view.) It applied per cent formatting according to its own ideas of what is right. You can fix it by changing the value in B2 to .10 instead of 10. Note, also, that this is one of the very few exceptions in EXCEL when the true value of a cell does not display in the formula bar. Again, this was probably done to make things intuitive for novices ... and tends to irritate experienced users, since it is an anomaly.

The bottom line on logic errors, is never turn off your common sense! Estimate, and double-check.