Introduction to Excel
Introduction to Excel
Workbook, worksheet, cell, range
Four words carry most of the vocabulary, and using them precisely prevents a surprising amount of confusion later.
- A workbook is the file - survey_2026.xlsx. One file.
- A worksheet is one tab inside it. A workbook can hold many, and a worksheet is where a grid actually lives.
- A cell is one box, addressed by its column letter followed by its row number: C7 is column C, row 7. Column letters run A to Z, then AA, AB and onward.
- A range is a selection of cells on a worksheet; Excel also allows a reference to combine noncontiguous areas. Here, B3:E48 names one contiguous rectangular range, covering columns B through E and rows 3 through 48, which is 4 columns by 46 rows. Count inclusively - rows 3 to 48 is 48 - 3 + 1 = 46, not 45.
To point at a cell on another tab, prefix the sheet name and an exclamation mark: Clean!B4. A whole column is B:B and a whole row is 7:7, which is convenient but dangerous in a statistical workbook, because a whole-column reference silently picks up anything a colleague types further down.
Formulas
The standard and unambiguous way to begin an Excel formula is =. Excel also accepts some entries beginning with + or - as formulas, but using = makes the intent clear and portable.
An entry that Excel does not parse as a formula is stored as a literal value - a number, date, logical value, or text.
Arithmetic follows the usual precedence - exponentiation first, then multiplication and division, then addition and subtraction - so =2+3*4 gives 14, and =(2+3)*4 gives 20.
One quirk is worth knowing: a leading minus binds tighter than exponentiation, so =-3^2 returns 9, while =0-3^2 returns -9. When in doubt, add parentheses.
Functions take ranges as arguments, which is what makes a spreadsheet useful on real data rather than on a handful of numbers.
If a variable occupies B2:B41, then =AVERAGE(B2:B41), =SUM(B2:B41), =MIN(B2:B41) and =MAX(B2:B41) all use the same 40-cell range.
These functions calculate from its numeric entries, skipping blanks and text; errors in the range propagate. If all 40 cells contain numbers, all 40 values contribute.
Two counting functions differ in a way that matters constantly: COUNT counts only cells holding numbers, while COUNTA counts every cell that is not empty, including text.
Relative, absolute and mixed references
This is the single most useful idea in a first Excel session, because it is what makes a formula written once work for a whole column.
A plain reference such as B2 is relative: it does not really mean "cell B2", it means "the cell in this row, two columns to the left" or whatever the offset happens to be. Copy the formula down one row and the reference follows, becoming B3. That is usually exactly what you want.
A dollar sign freezes a coordinate. $B$2 is absolute and never moves. B$2 and $B2 are mixed: the first keeps row 2 fixed while the column drifts, the second keeps column B fixed while the row drifts. Pressing F4 while editing a reference cycles through the four forms.
Worked example. A conversion factor sits in H1, and raw measurements occupy C2:C41. In D2, enter =C2*$H$1. Filling down to D41 gives =C3*$H$1, =C4*$H$1 and so on - the measurement reference advances while the factor stays put.
Writing =C2*H1 instead would give =C3*H2 in the next row, quietly multiplying by whatever happens to sit in H2, usually an empty cell that evaluates as zero.
Nothing about the result will look like an error; the column just fills with zeros or nonsense.
Mixed references shine in a two-way table. With labels down column A and headers across row 1, the single formula =B$1*$A2 entered in B2 and filled across and down builds the whole grid, because the header reference keeps row 1 and the label reference keeps column A.
Organizing a data table for statistical work
Software expects a particular shape, and honouring it makes every later step - sorting, summarizing, importing into another package - work without repair. The rules:
- One variable per column, one observation per row. Each column holds one kind of measurement for every case.
- Exactly one header row, at the top of the block, with short unambiguous names. Extra header rows or merged titles above the data can interfere with automatic range detection, filtering, and import workflows; keep them outside the exported table.
- No blank rows or columns inside the block. A blank row is how many tools decide the data ended.
- No units inside data cells. Typing 72 mmHg makes the cell text, so it is skipped by AVERAGE and counted only by COUNTA. Put the unit in the header - systolic_bp_mmhg - and keep the cell purely numeric.
- No merged cells anywhere in the data block.
- No totals or summary rows inside the block. Keep them on a separate sheet or outside the selected data range, since a sort or analysis range that includes a summary row may treat it as a case.
- One type per column. Do not mix numbers with explanatory words in the same column.
Missing values, zeros and text that looks numeric
These three are the most common source of a wrong summary from a correct formula.
A blank cell is ignored by AVERAGE and by COUNT. A zero is a real measured value and is fully included.
So recording a missing measurement as 0 does not merely fail to help - it actively drags the mean toward zero. Consider six cells holding 8, 0, 12, a blank, 10 and the word unknown.
Then =AVERAGE over that range returns (8 + 0 + 12 + 10)/4 = 7.5, =COUNT returns 4, and =COUNTA returns 5. Each function is behaving correctly; you simply have to know which cells each one sees.
Numbers stored as text are the silent version of the same problem. Values pasted from external sources may be stored as text, especially when they contain an apostrophe, nonbreaking space, or other hidden character; inspect the stored type rather than assuming every visible space forces text.
By default text aligns left while numbers align right, so a quick look at the alignment of a column is a fast diagnostic. Text entries are ignored by SUM and by AVERAGE when numeric cells are also present.
SUM over an all-text range returns 0, whereas AVERAGE returns #DIV/0! when the range has no numeric values and no error values; an error in the range propagates instead.
With mixed numeric and text data, either function can silently produce a misleading result by omitting the text entries.
Dates are stored as serial numbers with a display format applied, which is why subtracting two dates gives a count of days, and why a date typed in an ambiguous format can be silently reinterpreted.
The practical habit: after building a table, run COUNT and COUNTA on each variable and compare both against the number of cases you expect.
If COUNTA exceeds COUNT in an expected-numeric column, one or more nonempty cells are nonnumeric and should be inspected; a two-cell range holding 1 and TRUE returns a COUNT of 1 and a COUNTA of 2 with no text and no missing cell, so the type has to be checked rather than assumed.
If COUNTA is below the expected case count, cells are empty; if COUNT is lower than COUNTA, nonnumeric nonempty entries are present. Descriptive statistics tools, boxplots, histograms and pivot tables all come later and all assume this groundwork is sound.
A file named survey_2026.xlsx contains three tabs named Raw, Clean and Notes. On the Clean tab, the analysis data occupies the contiguous rectangular range B3:E48.
Which description uses the terminology correctly and states this range's dimensions correctly?
Cells F2:F7 hold, in order: 8, 0, 12, an empty cell, 10, and the text unknown.
What do =AVERAGE(F2:F7), =COUNT(F2:F7) and =COUNTA(F2:F7) return, in that order?