
77
HaCK 28:
Add a little color to your spreadsheets to better visualize data.
Google Spreadsheets allows you to add conditional formatting to cells. This means that you can
command your spreadsheet, for instance, to show every number greater than 1000 in green, or
to use a yellow background color to highlight cells containing the word “John”.
To get this feature to work for you, create a new spreadsheet or open an existing one. For sample
purposes, I am creating a spreadsheet to collect newsletter subscribers, containing columns
with the subscriber’s name, age, and profession as shown in Figure 3-29. Once you’ve set up your
spreadsheet, select all the columns you want to apply your conditional formatting to. They will
appear highlighted in blue. Right-click them, and select “Change format with rules . . . ” from the
context menu, as shown in Figure 3-29.
In the dialog that appears, you can now specify your custom constraints, and the appropriate
formatting. Let’s say you want to highlight in red all those cells where the age of the user listed is
below 18. In the drop-down box of the dialog, select “Less than,” and in the value box enter “18”
(without quotes), as shown in Figure 3-30. This custom color is applied to all cells that meet the
criteria as soon as you hit the “Save rules” button. The formatting will also appear in published
versions ...