Setting up the Spreadsheet for Friendly Usability

Create the header row

For a spreadsheet with a non-trivial number of rows, we want to create a header row that allows us to scroll through the many rows while being able to easily see the column heads:

../../../_images/friendly-bold-header.png

Notice how the header row stays the same even as the spreadsheet has been navigated down to its 8635th row:

../../../_images/friendly-bold-header-scrolled-down.png

Freeze the first row as header

../../../_images/freeze-header-row-result.png

Using the menu action to freeze the header

../../../_images/freeze-header-row-menu-action.png

Click-and-drag the frozen header

../../../_images/freeze-header-row-drag.png

Bold the text in the header row

Select the entire row by clicking the row number

../../../_images/select-entire-row-by-click.png

Bold the selected text

Using the keyboard shortcut: Command+B

Using the menu action: Format >> Bold

../../../_images/menu-action-format-bold.png

Using a monospace font for numerical values

End result is that the 3 numerical columns – year, count, and rank_within_sex, are set to a monospace font:

../../../_images/friendly-spreadsheet-numbers-to-monospace.png

The impact of font style when looking at numerical data

Why does modern spreadsheet software, by default, right-aligns text that represents numerical values?

To see this in action, in any spreadsheet, enter in text values, such as 9 and nine and 9 + 9:

../../../_images/friendly-spreadsheet-text-align-9-vs-nine.png

In any kind of tabular presentation, whether it be a spreadsheet or a table you draw up by hand, make sure that columns of numerical values are:

  • Are right-aligned
  • Use a monospace font

Let’s look at numerical values in which the values are left-aligned, using a variety of fonts:

../../../_images/friendly-spreadsheet-left-justified-font-numbers.png

With right-alignment, there is a little more order to things. Note how the significant places for each number are lined up correctly, e.g. the hundredths values and the hundreds values:

../../../_images/friendly-spreadsheet-right-justified-font-numbers.png

Padding numbers for clarity

This doesn’t impact our current data wrangling, but when dealing in values with varying decimal precision, sometimes it’s necessary to format values so that they all have the same physical width:

../../../_images/friendly-spreadsheet-numbers-same-precision.png
  • raw values are just the “naked”, actual values of the numbers, down to their most specific decimal point whether it is millionths or in ones
  • rounded to thousandths are the “raw” values rounded to the thousandths – or 3rd* decimal place. If a number doesn’t have that precision, no additional zeroes are added, i.e. 1000.14 remains 1000.14.
  • padded to 3 places are the values formatted such that they always show 3 decimal places. The value 1000.2 is “padded” with extra zeroes to look like 1000.200. The effect is merely visual, as both numbers are equal.

Select entire columns of data

Selecting a single column

Clicking the column label of a column – e.g. A for year – will highlight and select the entire column with the given label:

../../../_images/friendly-numbers-highlight-year-column.png

Adding multiple columns to the selection

To add additional columns to the current selection:

  • OSX: Hold Command while clicking each column label
  • Windows: Hold Ctrl while clicking each column label
../../../_images/friendly-numbers-highlight-several-columns.png

Picking the monospace font from the toolbar

I don’t think there is a keyboard shortcut or menu action for changing fonts (other than bold vs italic and font size). So look on the toolbar for Arial, or whatever the spreadsheet’s default font name. Click to bring a dropdown menu of available fonts.

I prefer Consolas, though Courier New is almost guaranteed to be on any system:

../../../_images/friendly-numbers-set-to-consolas-font.png

Resizing columns to their max width

  • Select column A by clicking on the label A.
  • Hold down the Shift-key
  • Click on label E to select every column, A through E
../../../_images/friendly-spreadsheet-highlight-all-cols-a-thru-e.png

Right-click the selection to bring up a pop-up context menu.

Then select the action, Resize columns A - E…

../../../_images/friendly-spreadsheet-highlight-all-cols-a-thru-e.png

This brings up a dialog box which asks if you want to format the columns by a fixed with (such as 100 pixels), or to format each column by their widest data value, i.e. Fit to data. Select the Fit to data option:

../../../_images/friendly-spreadsheet-popup-menu-resize-cols-dialog-box.png

The result is something quite a bit narrower:

../../../_images/friendly-spreadsheet-resized-cols-to-fit.png