Info

If you aren't careful, you might just print these off for your manager. You would be in trouble. Look in Cell E23. Luckily, Excel has a green triangle there telling you to look at the cell. If you would have happened to try this back in Excel 95 or Excel 97 before we had smart tags, there would have been no indicator that anything was wrong.

Move the cellpointer to E23. An alert indicator pops up near the cell. The indicator tells you that the formula fails to include adjacent cells. If you look in the formula bar, you can see that the macro totaled only from Row 7 to Row 22. Neither the relative recording nor the non-relative recording is smart enough to replicate the logic of the AutoSum button.

At this point, any sane person would give up. But imagine that you might have had fewer invoice records on this particular day. Excel would have rewarded you with the illogical formula of =SUM(E10:E65531) and a circular reference as shown in Figure 1.18.

Figure 1.18

The result of running the Relative Macro with fewer invoice records.

Figure 1.18

The result of running the Relative Macro with fewer invoice records.

El' - =SUM(E10:E65531) 1

0 0

Post a comment