Sub topic 2
Editing Cells, Filling Formulas, and Anchoring References
This chapter assumes you can enter data, write simple formulas, copy cells, and tell relative references (A1) from absolute references ($A$1).
Editing and filling formulas
Press F2 to edit the active cell in place. To fill a formula down, select the top cell and the cells beneath it, then press Ctrl+D. To fill right, select the leftmost cell and the cells to its right, then press Ctrl+R.
Anchoring references with F4
While editing, press F4 to cycle through four reference types: $A$1 (row and column fixed), A$1 (row fixed), $A1 (column fixed), and A1 (both relative). Anchoring lets one formula fill in both directions and still point at the right inputs.
=C$5*$B8This formula fixes row 5 and column B. Filled right and down, it always uses the row 5 header and the column B driver.
Auditing formulas from the keyboard
Ctrl+[ selects the cells that feed the active cell, and Ctrl+] selects the cells that depend on it. Ctrl+` toggles Show Formulas, so you can scan every formula on a sheet at once.
Number formats change display, not values
A number format changes how a cell looks. The stored value does not change. A cell holding 0.4 with the format 0 displays as 0, but any formula that uses that cell still receives 0.4.
Formatting shortcuts and ribbon key sequences
Ctrl+Shift+1 applies the comma format with two decimals, Ctrl+Shift+4 applies currency, and Ctrl+Shift+5 applies a percentage. Ctrl+1 opens the Format Cells dialog. On the ribbon, Alt+H then 0 increases decimal places, and Alt+H then 9 decreases them.
Reading and writing custom number format codes
A custom format has up to four sections separated by semicolons: positive; negative; zero; text.
#,##0_);(#,##0);"-"_)This code shows negatives in parentheses and zero as a dash. The _) adds a space the width of a closing parenthesis, which keeps positive and negative digits aligned. Two trailing commas scale a value by one million, so #,##0.0,, shows 12,345,678 as 12.3.
Exercise
Cell C8 must fill right and down while always using the row 5 header and the column B driver. Which formula do you enter in C8?
Show answer
=C$5*$B8. The $ before the 5 fixes the row, and the $ before the B fixes the column.