Workbooks, cells and references
The structure of a workbook, entering and editing data, autofill, number formats, and the relative, absolute and mixed references that make a formula copy correctly.
Module contents
A spreadsheet is application software that arranges data in a grid of rows and columns and recalculates automatically whenever a value changes. That last property is the whole point: a spreadsheet is not a table, it is a live model.
Examples: MS Excel, LibreOffice Calc, Google Sheets.
Structure
- A workbook is the file, saved with the extension
.xlsx. It contains one or more worksheets. - A worksheet (or sheet) is a single grid. Its tabs appear at the foot of the window and can be renamed, coloured, reordered, copied, hidden and deleted.
- A cell is the intersection of one row and one column, and is the smallest unit that holds data.
Columns are lettered A, B, … Z, AA, AB, … up to XFD ( columns). Rows are numbered to .
- A cell address (or reference) is the column letter followed by the row number: C5, AB120.
- The active cell is the one currently selected, outlined and named in the Name Box.
- A range is a rectangular block, written with a colon:
A1:C10means every cell from A1 to C10, cells in all. - A reference on another sheet carries the sheet name and an exclamation mark:
Sheet2!B4.
Parts of the window
Name Box (shows or sets the active cell), Formula Bar (shows what a cell actually contains, as opposed to what it displays), column and row headings, sheet tabs, status bar with quick totals, and the fill handle — the small square at the bottom-right corner of the selection.
The formula bar is the honest view. A cell may display
1,234.00or15%or31-Mar-26, while the formula bar shows1234,0.15or=TODAY(). Formatting changes the display; it never changes the stored value. Almost every confusing spreadsheet result comes from forgetting this.
What a cell can contain
| Type | Recognised because | Default alignment |
|---|---|---|
| Number | Digits, optionally with a decimal point or minus sign | Right |
| Text (label) | Anything not recognised as a number or date | Left |
| Date / time | Matches a date pattern | Right (dates are numbers) |
| Formula | Begins with = | Result's alignment |
| Logical | TRUE or FALSE | Centre |
The default alignment is a free diagnostic. A column of figures with one entry sitting on the left is not a number — usually because it contains a stray space or was imported as text — and that entry will be silently ignored by SUM.
Dates are numbers. Excel stores a date as the count of days since 1 January 1900, so 1 Jan 2026 is . This is why dates can be subtracted to give a number of days, and why a date column formatted as General suddenly shows five-digit numbers.
Entering and editing
- Type into the active cell and confirm with Enter (moves down), Tab (moves right), or the tick in the formula bar. Esc abandons the entry.
- F2 or a double-click edits in place; typing over a cell replaces its contents entirely.
- Alt+Enter puts a line break inside a cell.
- Ctrl+Enter fills the whole selected range with the same entry.
- Wrap Text makes long text wrap within the column width instead of spilling across.
#####filling a cell means only that the column is too narrow to display the number — the value is intact; widen the column.
AutoFill and the fill handle
Drag the fill handle to extend a pattern:
- One number, dragged — copies it. Two numbers selected first (1, 2 or 5, 10) — continues the series.
- Dates, months and weekdays extend on their own from a single entry.
- Text ending in a number extends: "Item 1" becomes "Item 2", "Item 3".
- A formula dragged is copied with its references adjusted — the subject of the next section.
- Double-clicking the fill handle fills down as far as the neighbouring column has data, which is far quicker than dragging on a long list.
- Flash Fill (Ctrl+E) infers a pattern from an example — splitting "Anjali R" into first and last name, for instance.
Number formats
Formatting decides only how a value appears.
| Format | Effect on 0.5 |
|---|---|
| General | 0.5 |
| Number, 2 decimals | 0.50 |
| Currency | ₹0.50 |
| Percentage | 50% |
| Fraction | 1/2 |
| Scientific | 5.00E-01 |
| Text | left-aligned, and no longer calculable |
Also: date and time formats, comma style for thousands separators, and Custom formats for patterns such as showing negatives in red.
Increase/Decrease Decimal changes the display only. A cell showing may hold , so a column of rounded displays can appear not to add up. If the value must be rounded, use the ROUND function — not a format.
Formatting cells
- Font — name, size, bold, italic, colour
- Alignment — horizontal, vertical, wrap text, merge cells, orientation
- Borders and fill — grid lines that print, and background colour (screen gridlines do not print unless asked)
- Styles and Format as Table
- Conditional formatting — formatting that depends on the value; see the next topic
- Format Painter — copies formatting from one place to another
- Freeze Panes — keeps heading rows and columns visible while scrolling a long sheet. Indispensable beyond one screenful of data.
References — the heart of the spreadsheet
When a formula is copied, what happens to the cell addresses inside it? The answer depends on the dollar signs, and this is the single most examined idea in the topic.
Relative reference — A1
No dollar signs. The reference shifts with the formula. Copied one column right, A1 becomes B1; copied one row down, it becomes A2.
This is the default, and usually what is wanted: =B2*C2 in row 2 should become =B3*C3 in row 3.
Absolute reference — $A$1
Dollar signs on both parts. The reference never changes, however the formula is copied.
Used for a single fixed value that every formula must consult — a tax rate in one cell, a conversion factor, a grand total.
Mixed reference — $A1 or A$1
One part locked, the other free.
$A1— the column is fixed, the row moves. Copying across keeps referring to column A.A$1— the row is fixed, the column moves. Copying down keeps referring to row 1.
Mixed references are what make a single formula fill a two-dimensional table such as a multiplication grid.
The dollar sign locks what follows it.
$Alocks the column;A$1locks the row. Pressing F4 while editing a reference cycles through the four possibilities:A1→$A$1→A$1→$A1→ back.
Summary
| Written | Column | Row | Copied down | Copied right |
|---|---|---|---|---|
A1 | free | free | changes | changes |
$A$1 | locked | locked | fixed | fixed |
$A1 | locked | free | changes | fixed |
A$1 | free | locked | fixed | changes |
Worked examples
3 solvedEvery step is shown, in the order you would write it in an answer book.
Predicting what a formula becomes when copied
Question
Cell D2 contains =B2*$F$1+C$1-$A2. Write the formula as it appears after copying to F5.
Find the displacement
From D2 to F5:
- columns: D → F, so 2 columns right
- rows: 2 → 5, so 3 rows down
Every relative part shifts by exactly this amount; every locked part does not.
Take each reference in turn — B2
B2is fully relative. Both parts move: column B + 2 = D, row 2 + 3 = 5.$F$1— both parts lockedBoth parts are locked, so nothing changes.
C$1 — mixed, row locked
The column has no dollar, so it moves: C + 2 = E. The row is locked at 1.
$A2 — mixed, column locked
The column is locked at A. The row has no dollar, so it moves: 2 + 3 = 5.
Assemble
Answer
=D5*$F$1+E$1-$A5
NoteWork reference by reference, not formula by formula. Ask of each part: is there a dollar in front of it? If not, add the displacement.
Why one formula needs an absolute reference
Question
Column B holds prices in B2:B6 and cell E1 holds the GST rate . A student enters =B2*E1 in C2 and fills down to C6, and gets the right answer in C2 and zeros below. Explain and correct it.
Work out what the fill actually produced
E1is relative, so it moved down with the formula:Cell Formula after filling What E-column cell it reads C2 =B2*E1E1 — the rate ✓ C3 =B3*E2E2 — empty C4 =B4*E3E3 — empty C5 =B5*E4E4 — empty C6 =B6*E5E5 — empty Explain the zeros
An empty cell used in arithmetic is treated as . So every row below the first computes
which is why the results are zeros rather than error values — the formula is perfectly valid, it is simply multiplying by nothing.
Identify what should have been locked
The price must change with each row; the rate must not. So the price reference stays relative and the rate reference becomes absolute:
Apply and verify
Enter
=B2*$E$1in C2 and fill down. Now:Cell Formula C2 =B2*$E$1C3 =B3*$E$1C6 =B6*$E$1Every row multiplies its own price by the one rate.
Note the further advantage
Because the rate lives in one cell that every formula consults, changing E1 from to updates all five results at once. Typing into each formula would give the same answers today and five edits to make tomorrow — and one of them would be missed.
Answer
E1 was relative and drifted to empty cells, which count as zero. Use =B2*$E$1, filled down.
NoteThe rule of thumb: a value that appears once on the sheet but is used by many formulas needs an absolute reference.
Filling a multiplication table with mixed references
Question
Row 1 holds to in B1:K1, and column A holds to in A2:A11. Write a single formula for B2 that, filled across and down, produces the whole multiplication table.
State what must stay fixed in each direction
B2 must multiply the number at the top of its column by the number at the left of its row.
- The top number is always in row 1, whichever column we are in. So the row must be locked and the column free.
- The left number is always in column A, whichever row we are in. So the column must be locked and the row free.
Write the two references
Top of the column:
B$1— column free, row locked.Left of the row:
$A2— column locked, row free.Give the formula
Enter this in B2, then select B2 and fill across to K2, then select B2:K2 and fill down to row 11.
Check a cell away from the corner — D5
From B2 to D5 is 2 columns right and 3 rows down.
B$1: column B + 2 = D, row locked →D$1— the top of column D, which holds .$A2: column locked, row 2 + 3 = 5 →$A5— the left of row 5, which holds .So D5 computes ✓
See why neither alternative works
Fully relative
=B1*A2would drift both references diagonally and give nonsense away from the first cell.Fully absolute
=$B$1*$A$2would put in all 100 cells.Only the mixed form varies in one direction per reference, which is exactly what a two-dimensional table needs.
Answer
=B$1*$A2 in B2, filled across and down.
NoteAny grid computed from a header row and a header column uses this pattern: lock the row for the header row, lock the column for the header column.
Practice problems
5 with solutionsWork each one on paper first. The full solution — not just the answer — is one click away.
Define workbook, worksheet, cell, cell address and range, and state how many rows and columns a worksheet has.
Show solutionHide solution
-
Workbook — the spreadsheet file, saved with the extension
.xlsx. One workbook contains one or more worksheets. -
Worksheet — a single grid of rows and columns within the workbook, reached by its tab at the foot of the window. Sheets can be renamed, reordered, copied, coloured, hidden and deleted.
-
Cell — the intersection of one row and one column; the smallest unit that holds data.
-
Cell address (reference) — the column letter followed by the row number, such as C5 or AB120. A cell on another sheet is written
Sheet2!C5. -
Range — a rectangular block of cells, written with a colon.
A1:C10is every cell from A1 to C10 — columns rows cells.
Size of a worksheet.
Columns are lettered A to Z, then AA to AZ, and so on up to XFD.
Also worth knowing: the active cell is the currently selected one, shown in the Name Box; and the formula bar shows what a cell actually contains, which may differ from what it displays.
A cell shows #####. What does this mean and how is it corrected? How does it differ from an error value?
Show solutionHide solution
What it means. The column is simply too narrow to display the number in its current format. It is not an error of any kind: the value stored in the cell is complete and correct, and any formula referring to the cell gets the right answer. Excel shows hashes rather than a truncated number, because a number cut short would be worse than no number — 1234567 displayed as 123 would be actively misleading.
How to correct it. Any of:
- Widen the column — drag the boundary in the column heading, or double-click it to autofit to the widest entry.
- Reduce the decimal places shown, or choose a more compact number format.
- Reduce the font size, or switch on Wrap Text / Shrink to Fit in Format Cells.
How it differs from an error value. Hashes filling the cell are a display problem. An error value is a computation problem, and the cell genuinely holds no usable result:
| Shown | Meaning |
|---|---|
##### | Column too narrow — value is fine |
#DIV/0! | Division by zero or by an empty cell |
#VALUE! | Wrong type of argument — arithmetic on text |
#REF! | The referenced cell no longer exists (usually deleted) |
#NAME? | A misspelled function name or an undefined name |
#N/A | A lookup found no match |
#NULL! | An invalid range operator |
#NUM! | A numeric value that is impossible, e.g. the square root of a negative |
The practical difference: widening the column fixes hashes and nothing else; an error value needs the formula or the data corrected, and it propagates — every formula depending on an error cell shows an error too.
Explain relative, absolute and mixed cell references with an example of when each is needed.
Show solutionHide solution
The three kinds differ in what happens to a reference when the formula is copied, and they are distinguished by the dollar signs. The dollar locks whatever follows it.
1. Relative reference — A1
No dollar signs. Both the column and the row adjust by the displacement of the copy. Moved one column right, A1 becomes B1; moved one row down, A2.
Needed when: every row must use its own data. Calculating =B2*C2 for the amount of an order in row 2, then filling down so that row 3 computes =B3*C3. This is the default, and correct most of the time.
2. Absolute reference — $A$1
Both parts locked. The reference is identical in every copy of the formula.
Needed when: one value stored in one cell must be consulted by every formula. A GST rate in E1, used as =B2*$E$1 and filled down; a currency conversion factor; a grand total used to compute each row's percentage share, =B2/$B$20.
An extra benefit: the constant exists in exactly one place, so changing it updates every dependent formula at once. Typing the number into each formula instead would mean editing every one.
3. Mixed reference — $A1 or A$1
One part locked, the other free.
$A1— column fixed, row free. Copying across keeps pointing at column A; copying down moves through its rows.A$1— row fixed, column free. Copying down keeps pointing at row 1; copying across moves through its columns.
Needed when: a formula must be filled both across and down, taking one factor from a header row and the other from a header column. In a multiplication table with the multipliers in row 1 and the multiplicands in column A, the single formula
fills the entire grid correctly. Neither a fully relative nor a fully absolute version can do this — the first drifts diagonally into nonsense, the second repeats one product in every cell.
Shortcut. Pressing F4 while the cursor is on a reference cycles A1 → $A$1 → A$1 → $A1 → A1.
A1) shifts with the copy — used so each row calculates from its own data. Absolute ($A$1) never changes — used for one constant consulted by many formulas, such as a tax rate. Mixed ($A1, A$1) locks one part — needed when a formula is filled both across and down from a header row and a header column.Cell C3 contains =$B3+C$2-A1. State the formula after copying to (a) E3 (b) C6 (c) F8.
Show solutionHide solution
First fix the rule for each reference:
$B3— column locked at B, row freeC$2— column free, row locked at 2A1— both free
(a) C3 → E3. Displacement: 2 columns right, 0 rows.
| Reference | Column | Row | Result |
|---|---|---|---|
$B3 | locked | 3 + 0 = 3 | $B3 |
C$2 | C + 2 = E | locked | E$2 |
A1 | A + 2 = C | 1 + 0 = 1 | C1 |
(b) C3 → C6. Displacement: 0 columns, 3 rows down.
| Reference | Column | Row | Result |
|---|---|---|---|
$B3 | locked | 3 + 3 = 6 | $B6 |
C$2 | C + 0 = C | locked | C$2 |
A1 | A + 0 = A | 1 + 3 = 4 | A4 |
(c) C3 → F8. Displacement: 3 columns right, 5 rows down.
| Reference | Column | Row | Result |
|---|---|---|---|
$B3 | locked | 3 + 5 = 8 | $B8 |
C$2 | C + 3 = F | locked | F$2 |
A1 | A + 3 = D | 1 + 5 = 6 | D6 |
Method to use in the exam: write the displacement as (columns, rows) first, then treat each reference independently — add the column displacement unless a dollar precedes the letter, and the row displacement unless a dollar precedes the number.
=$B3+E$2-C1 (b) =$B6+C$2-A4 (c) =$B8+F$2-D6A column of numbers is formatted to show no decimal places. Each cell displays a whole number, but SUM of the column shows a total one greater than adding the displayed numbers by hand. Explain, and say how it should be handled.
Show solutionHide solution
The cause: formatting changes the display, not the value.
Reducing the decimal places shown is a format. The cell continues to hold its full value, and every formula uses that full value. So the sheet is doing arithmetic on numbers that are not the ones on the screen.
A concrete illustration. Suppose four cells hold
Displayed with no decimals, each rounds to , so the column reads
Adding what is displayed gives . But SUM works on the stored values:
which is then displayed as . The reader sees four tens totalling forty-two, and quite reasonably concludes the spreadsheet is wrong. It is not — the displayed figures are each rounded down by , and four such losses come to , enough to move the total by two.
The discrepancy therefore grows with the number of rows, which is why it is invisible in a short test and obvious in a real report.
How it should be handled. Which remedy is right depends on what is actually required.
1. If the underlying precision matters — show it. Display enough decimal places that the figures shown do add up. Honest and simplest, and correct for engineering or scientific data.
2. If the values themselves should be whole — round them, do not merely format them. Use the ROUND function to change the stored value:
=ROUND(A2,0)
Now the cell genuinely holds , and SUM over the rounded column gives exactly . Use ROUND(x,2) for two decimals. This is the correct approach for currency, where the paisa either exists or it does not, and a printed invoice must add up.
3. Round the total rather than the parts, if the parts are estimates and only the total is reported. Perfectly valid, but it must be documented, because the total will not equal the sum of the printed parts.
What not to do. Excel offers a setting called Set precision as displayed, which permanently discards the hidden decimals across the whole workbook. It appears to solve the problem, and it does — by destroying data irreversibly. There is no undo and no way to recover the original values.
The general lesson. Formatting is for the reader; functions are for the data. Any requirement expressed as "the values must be whole" or "amounts must be to two decimals" is a requirement about values, and must be met with ROUND — never with a display format.
=ROUND(A2,0). Never use Set precision as displayed, which discards data irreversibly.