Spreadsheet tabular model

ID: spreadsheet-tabular-model

A spreadsheet tabular model assigns a consistent meaning to each row and column. For an original example, let rows 2–4 describe three items, with quantity in column A, unit price in column B, subtotal in column C, and total including tax in column D. Put the single shared tax rate in F1. The chosen rate is an illustrative assumption. Quantities, unit prices and F1 are inputs; columns C and D hold spreadsheet formulas and display their computed values as outputs.
Enter decimal inputs 2.5, 1.75, 4.5 for the unit prices and 0.2 for the tax rate. The following table expresses those values as exact fractions so that the arithmetic is easy to check. It does not require typing a fraction into an input spreadsheet cell or assume that all software calculates with exact rational numbers.
RowQuantity (A)Unit price (B)Subtotal (C)Total including tax (D)
2
3
4
Start with C2 containing =A2*B2 and D2 containing =C2*(1+$F$1). Here * requests multiplication, and 1+$F$1 adds the tax fraction to one. Copy these two spreadsheet formulas down into rows 3 and 4, a fill operation. The relative spreadsheet references change with the destination row: C3 becomes =A3*B3 and D3 becomes =C3*(1+$F$1); C4 becomes =A4*B4 and D4 becomes =C4*(1+$F$1). The absolute spreadsheet reference $F$1 continues to read the shared rate. Copying spreadsheet formulas adjusts relative coordinates while retaining absolute coordinates. [ref]
Figure 1.
Original three-row spreadsheet tabular model before and after filling two spreadsheet formulas, with a shared absolute spreadsheet reference
. Details.
The same mathematical expression applies to every item. Writing for quantity, for unit price and for the shared tax rate gives
For row 2, the exact arithmetic is . The subtotals add to , so the totals add to , agreeing with . The spreadsheet formulas encode the relationship; the displayed numbers are its results for these particular inputs.
This separation is useful for forecasting and sensitivity analysis. Keeping quantities and unit prices fixed while changing only F1 from to gives exact totals , , and . More generally, a rate change changes each total by
This follows by expanding the two mathematical expressions and cancelling . Here , so the increases are , , and , adding to . One shared input makes the assumption visible and consistent across all rows. Overwriting a computed total with a number would instead remove that spreadsheet formula; its value would cease to follow the model when the rate changes.
// Target: computer-science.bigb

New to topics? Read the docs here!