Sub topic 11
Documenting conventions with a legend and cover sheet
A model can follow every convention in this tutorial and still confuse a reader who does not know them. Colours, signs, units and checks all carry meaning, and that meaning has to be written down inside the workbook. This chapter covers what to document, where to put it, and how to keep it accurate.
This chapter assumes you can already apply font colours, fill colours, number formats and check cells. It builds on the earlier chapters on colour coding, sign conventions and units, and on check cells.
Why the documentation belongs inside the workbook
Conventions that live in someone's head, an email or a separate Word file get lost. A model is often handed to a new analyst, sent to a lender, or reopened a year later. The reader then has to guess whether blue means "input" or "this cell changed", and whether a bracketed number is a cost or a loss.
Documentation inside the workbook travels with the file and can be checked against the cells it describes. A good setup has three parts:
- A legend that decodes the visual codes: font colours, fills, number formats.
- A cover sheet that identifies the model and states its basis: purpose, units, sign convention, timeline, status and check results.
- Notes and a change log that explain decisions and record what changed over time.
What the legend must cover
The legend answers one question: what does this formatting mean? It should list every code the model actually uses, and nothing it does not use. A legend that describes a colour never used in the model makes readers distrust the rest.
The legend should be built from real cells, not typed descriptions. Each sample cell carries the same font, fill and number format as the cells it describes.
| Code | Sample | Meaning |
|---|---|---|
| Blue font | 0.08 | Hardcoded input |
| Black font | formula | Calculation on the same sheet |
| Green font | link | Link to another sheet |
| Red font | link | Link to another file |
| Light yellow fill | input cell | Cell the user is expected to change |
| Red fill | check cell | A check has failed |
The table shows the structure. In the workbook, the "Sample" column holds formatted cells, not text. If you later change the input colour from blue to a different shade, you update the sample cell once and the legend stays truthful.
The legend should also show the number formats in use. A short block of samples is enough:
Number: #,##0_);(#,##0);"-"_)
Percentage: 0.0%_);(0.0%);"-"_)
Multiple: 0.0"x"_)Next to each, show a positive value, a negative value and a zero, so the reader sees how each is displayed.
Building a legend that stays accurate
A legend drifts out of date when someone changes a convention in the model and forgets the legend. You can reduce this risk by generating the legend from the same style definitions that format the model.
The script below creates a legend sheet using named style constants. The same constants can format the model sheets, so a change in one place updates both.
from openpyxl import Workbook
from openpyxl.styles import Font, PatternFill
BLUE = Font(color="0000FF")
BLACK = Font(color="000000")
GREEN = Font(color="008000")
RED = Font(color="FF0000")
INPUT_FILL = PatternFill("solid", start_color="FFFFCC")
CHECK_FILL = PatternFill("solid", start_color="FFC7CE")
wb = Workbook()
ws = wb.active
ws.title = "Legend"
ws["A1"] = "Legend"
ws["A1"].font = Font(bold=True, size=14)
rows = [
("Hardcoded input", 0.08, BLUE, None, "0.0%"),
("Formula, same sheet", "=B3*100", BLACK, None, "0.0"),
("Link to another sheet", "=Legend!B3", GREEN, None, "0.0%"),
("Input cell to be changed", 0.08, BLUE, INPUT_FILL, "0.0%"),
("Failed check", 1, BLACK, CHECK_FILL, "0"),
]
ws["A2"], ws["B2"], ws["C2"] = "Meaning", "Sample", "Rule"
for cell in ("A2", "B2", "C2"):
ws[cell].font = Font(bold=True)
for i, (label, value, font, fill, fmt) in enumerate(rows, start=3):
ws.cell(row=i, column=1, value=label)
sample = ws.cell(row=i, column=2, value=value)
sample.font = font
sample.number_format = fmt
if fill is not None:
sample.fill = fill
ws.column_dimensions["A"].width = 28
ws.column_dimensions["B"].width = 12
wb.save("legend_example.xlsx")Running this produces legend_example.xlsx with a Legend sheet. Note that the "Link to another sheet" sample points to a cell on the same sheet, which keeps the file self-contained. In a real model the link would point to a different sheet.
The cover sheet
The cover sheet is the first sheet in the workbook. A reviewer opens it before anything else, so it should answer the questions they would otherwise have to ask.
Include these items:
- Model name and purpose. One or two sentences on what the model is for and what decision it supports.
- Version and date. A version number, the date of the last update, and the author or owner.
- Status. For example draft, under review or final.
- Units and currency. For example "USD millions unless stated otherwise".
- Timeline. The first and last period, the period length (annual, quarterly), the fiscal year end, and the last actual period.
- Sign convention. A single sentence, such as "Revenue positive, costs negative, cash outflows negative."
- Sheet index. A list of sheets with a one-line description of each, ideally with hyperlinks.
- Check summary. A cell that pulls together all model checks.
- Legend. Either on the cover sheet itself or linked from it.
Keep the cover sheet to one screen where possible. A reader should not need to scroll to find the sign convention.
Linking the cover sheet to live cells
Values on the cover sheet that can change should be formulas, not typed text. If the cover sheet says "USD millions" in typed text but the model's unit cell says "USD thousands", the two have contradicted each other.
Store the unit and the last-actual date once on the Assumptions sheet, and have the cover sheet refer to them:
Units: =Assumptions!C4
Last actual period: =TEXT(Assumptions!C6,"mmm yyyy")
Model checks: =IF(SUM(Checks!D5:N5)=0,"OK","ERROR")The check summary is the most important live cell. It connects directly to the check cells from the previous chapter, as in =SUM(D60:N60). A reader sees "OK" or "ERROR" before looking at any numbers.
Use the same colour rules on the cover sheet that you use elsewhere. Those cells are links to another sheet, so they take the green font.
How the pieces fit together
The legend and cover sheet read from the model, and the model's formatting is what the legend describes.
Notes and the change log
The legend explains the codes. Notes explain decisions. Use notes for anything a reader could reasonably question, for example:
- Why a growth rate was set to a particular value, and its source.
- A hardcoded number inside a formula that you could not avoid, and why.
- A known limitation, such as "Tax is calculated on a simple rate and ignores loss carry-forwards."
- A change to the sign convention in one section, if one exists.
Place a note next to the item it refers to, in a "Notes" column at the right of the row, or in a numbered notes list that the row label points to, such as "Revenue (see note 3)". Avoid cell comments as the only record. They are easy to miss, and they do not print by default.
A change log is a table on its own sheet. Each row records the date, the version, who made the change, what changed and why.
| Version | Date | Author | Change |
|---|---|---|---|
| 1.0 | 2026-03-01 | A. Patel | First issue |
| 1.1 | 2026-04-12 | A. Patel | Added capex schedule, fixed tax link |
| 1.2 | 2026-06-30 | R. Lee | Rolled forward actuals to Q2 |
Update the log when the version number changes, and nowhere else. If the version number on the cover sheet is a link to the last log row, the two cannot disagree.
Common errors
- A legend that describes a convention the model does not follow. For example, the legend says costs are negative, but one schedule shows them positive. Check by sampling cells against the legend.
- Typed text that contradicts live values. "USD millions" typed on the cover sheet while the model works in thousands. Link the text to the units cell.
- A legend of text descriptions only. A reader cannot compare a word like "blue" with a slightly different shade on the sheet. Use formatted sample cells.
- A cover sheet that is never updated. A stale date and version make readers doubt the model. Link what you can and add the cover sheet to the pre-release checklist.
- Over-documenting. Five pages of notes will not be read. Document conventions briefly on the cover sheet and put detail in notes beside the rows it concerns.
- Hidden documentation. A legend on a hidden or very-hidden sheet is of no help to the reader. Keep it visible and place it near the front.
A short pre-release checklist
- The cover sheet shows the current version, date, status and units.
- The check summary reads "OK" and is linked to the real check cells.
- The legend lists every font colour, fill and number format in use, and no others.
- The legend samples are formatted cells that match the model.
- The sign convention is stated in one sentence and matches the model.
- Notes exist for each hardcoded exception and each major assumption.
- The change log has an entry for this version.
Exercise
A cover sheet says "Units: USD millions" as typed text. The Assumptions sheet has a unit cell set to "USD thousands", and the model's figures are in thousands. Name the problem, and describe how you would fix it so that it cannot recur.
Show answer
The typed text contradicts the model's actual units, so a reader would misread every figure by a factor of 1,000. Fix it by replacing the typed text with a link to the Assumptions unit cell (for example =Assumptions!C4) and formatting it with the green font for a cross-sheet link. The cover sheet then always shows the units the model uses, and a single change on the Assumptions sheet updates both.
Exercise
List four items that belong on a cover sheet, and say which of them should be live formulas rather than typed text.
Show answer
Any four of: model name and purpose, version and date, status, units and currency, timeline, sign convention, sheet index, check summary, legend. The units, the last actual period and the check summary should be live formulas, because they depend on values elsewhere in the model and would otherwise drift out of date. The version can also be linked to the last row of the change log.
Exercise
Why should the legend use formatted sample cells rather than a text description such as "blue = input"?
Show answer
A sample cell has the same font colour, fill and number format as the model cells, so the reader can compare it directly with what they see. It also stays correct: when the style changes, you update the sample cell and the legend matches the model. A text description cannot show the exact shade, and it can be left unchanged when the formatting changes.