Part III: Creating Charts and Graphics
498
Figure 20.17 shows an example.
For different sized groups, change the 4 to some other value. For example, use this formula to
shade alternate groups of two rows:
=MOD(INT((ROW()-1)/2)+1,2)
FIGURE 20.17
Conditional formatting produces these groups of alternate shaded rows.
Displaying a total only when all values are entered
Figure 20.18 shows a range with a formula that uses the SUM function in cell C6. Conditional for-
matting is used to hide the sum if any of the four cells above is blank. The conditional formatting
formula for cell C6 (and cell C5, which contains a label) is
=COUNT($C$2:$C$5)=4
This formula returns TRUE only if C2:C5 contains no empty cells.
Figure 20.19 shows the worksheet when one of the values is missing.