Why Spreadsheet Structure Matters
A spreadsheet can look orderly to a person and still be difficult to analyze. A heading stretched across several columns, a subtotal placed among observations, or several measurements combined in one cell can hide what each entry represents. Before using data, a reader should be able to identify the observational unit for each row and the variable for each column.
This arrangement is useful because it gives every recorded value a clear location: the row identifies the unit, and the column identifies the variable measured on that unit. A person can then compare values down a column or inspect several variables across a row without having to infer the table’s meaning from formatting.
The appropriate observational unit depends on the question and the data collection. If a clinic is measured once, a row might represent a clinic. If patients are measured at several visits, a row might represent a patient-visit rather than a patient alone. The key is to choose a unit that matches what one record describes, then apply that choice consistently.
A spreadsheet is not well structured merely because it has gridlines or because its contents fit on one screen. A useful data table has a clear header row, one value per cell, and no presentation formatting that must be interpreted to discover which observations belong to which variable.
From the Study to the Table
Start by naming the observational unit, then list the variables recorded for each unit. A data dictionary—the list of variables and their meanings—can help keep the column names and interpretations consistent. For instance, if a table describes one row per student, columns might include student ID, study group, and quiz score. The identifier distinguishes rows; the other columns record characteristics or measurements.
Each row should describe one unit, not a group average or a mixture of several units. Each column should have one meaning throughout the table. If a column is called score, its entries should all be scores for the same assessment and on the same scale, rather than scores in some rows and comments in others.
An identifier can be a useful column when it distinguishes units, especially if a person’s name is not appropriate or not unique. It is still important to ask what each row represents: an ID does not by itself establish that the table has one row per person. For example, the same patient ID could appear in several rows if each row represents a separate visit.
Worked Example: Expanding a Grouped Clinic Summary
Suppose a hypothetical survey records the waiting time, in minutes, for four clinic patients. A spreadsheet has merged the “Morning” label across two rows and the “Afternoon” label across two more:
| Time of day | Waiting time (minutes) |
|---|---|
| Morning (merged across two rows) | 12 |
| 18 | |
| Afternoon (merged across two rows) | 9 |
| 15 |
The observational unit is one patient, and the variables are time of day and waiting time. The merged formatting makes the time-of-day value visually apply to more than one row, but the second and fourth patient records have no explicit value in that column. If the label is inferred from the formatting, it may be lost or misread when the table is sorted, filtered, or otherwise used.
The reshape is to repeat the category in each patient’s row and add an identifier if the patients need to be distinguished:
| Patient ID | Time of day | Waiting time (minutes) |
|---|---|---|
| P01 | Morning | 12 |
| P02 | Morning | 18 |
| P03 | Afternoon | 9 |
| P04 | Afternoon | 15 |
Now each row is one patient, and each column has one meaning. The category is an explicit cell value rather than a visual instruction about which rows belong together.
Keep Records Separate From Summaries
A summary answers a different question from a row of recorded data. For example, a total, average, or count describes multiple observations; it is not another patient, student, or clinic. Placing summary rows inside a table of individual records can make software or a reader treat the summary as if it were an observation.
Keep a table of records limited to the units being described. If a summary is useful, place it outside that table or in a separate summary table whose purpose is clear. This preserves the distinction between the original units and a calculation based on them.
Worked Example: Removing Embedded Totals
A hypothetical study records the number of appointments attended by five patients. The spreadsheet includes a total row:
| Patient ID | Appointments attended |
|---|---|
| A01 | 2 |
| A02 | 3 |
| A03 | 1 |
| A04 | 4 |
| A05 | 2 |
| Total | 12 |
The observational unit is one patient, so the data table should contain five patient rows. The final row does not represent a patient; it is a sum of the values above it. The arithmetic is \(2+3+1+4+2=12\), but 12 is not a sixth patient’s number of appointments. A corrected records table therefore ends after A05:
| Patient ID | Appointments attended |
|---|---|
| A01 | 2 |
| A02 | 3 |
| A03 | 1 |
| A04 | 4 |
| A05 | 2 |
The total can be reported separately as a summary of these five records. Keeping it out of the records table makes the number of observational units unambiguous and prevents the total from being mistaken for a patient-level value.
Choose the Row Unit for Repeated Measurements
When the same unit is measured more than once, decide what one row should represent. One option is a row per person with separate columns for each occasion. Another is a row per person per occasion, with a column identifying the occasion. The second choice makes the observational unit a person-occasion record. Either arrangement can be coherent if it is explicit and fits the intended data use; the important point is not to leave repeated measurements hidden in a single cell or unclear from the row structure.
Worked Example: Recording Measurements at Two Visits
In a hypothetical project, three participants have a measurement recorded at an initial visit and again at a follow-up visit. If the question is about each participant’s value at each visit, use one row per participant-visit. The variables are participant ID, visit, and measurement:
| Participant ID | Visit | Measurement (units) |
|---|---|---|
| R01 | Initial | 5.2 |
| R01 | Follow-up | 5.8 |
| R02 | Initial | 4.9 |
| R02 | Follow-up | 5.1 |
| R03 | Initial | 6.0 |
| R03 | Follow-up | 5.7 |
There are six rows because there are three participants measured on two occasions. Each row describes one participant at one visit, and the participant ID appears twice because the same participant contributes two records. An alternative with one row per participant would use separate columns for initial and follow-up measurements. That can also communicate the data, but the table’s structure must make clear that the two measurement columns refer to different visits. The row unit should be chosen deliberately rather than assumed from the number of people.
A Structural Check: One Value for Each Unit and Variable
The table structure can be understood as a mapping from a unit and a variable to a value. For every recorded unit-variable pair, there should be one clearly located value. If a cell contains “12 minutes; late arrival,” it combines values for potentially different variables. If one column contains waiting times for patients in some rows and waiting-time averages for clinics in others, the column does not have one consistent meaning.
This gives a short justification for the row-and-column rule: a value can be interpreted only when its unit and its variable are identifiable. With one unit per row and one variable per column, the cell at their intersection identifies both. When a table relies on merged formatting, embedded summaries, or combined values, that mapping is no longer reliably visible without extra interpretation.
Common Mistakes and Practical Checks
A common mistake is to treat spreadsheet appearance as data structure. For example, someone may reason, “The category label is shown above these rows, so it is obvious which rows it applies to.” The correction is to store that category explicitly in each relevant row. Formatting can aid presentation, but it should not carry information needed to interpret the records.
Another mistake is to leave a total row in place because “it is just one more row.” It is not one more observational unit. The correction is to separate summaries from the records they summarize. Similarly, placing two variables in one cell because the information fits—for example, “Morning, 12”—makes later interpretation depend on splitting that text. Store the two values in separate columns.
Before treating a small spreadsheet as a data table, check the following:
- Can you state exactly what one row represents?
- Does each column have one consistent meaning and a clear heading?
- Are category labels recorded in the rows to which they apply, rather than only shown through merged cells or layout?
- Does every cell hold one value for one variable, rather than a list or a combined description?
- Are totals and other summaries outside the rows of individual records?
These checks concern structure, not whether the recorded values are correct. A well-structured table can still contain inaccurate or incomplete data, and a table with correct values can still be hard to interpret if its rows and columns do not clearly represent units and variables. Clear structure is the foundation for assessing and using the values responsibly.
Check Your Understanding
Use the row-and-column rule to reason through each situation.
- A spreadsheet has one row per school, with columns for school ID, district, and enrollment. What is the observational unit, and what does each row represent?
- Why should a “Total” row usually be kept outside a table whose rows represent individual patients?
- A category label appears once in a merged cell spanning four records. What change would make the category explicit for each record?
- Three people each have measurements at two visits. If one row represents one person-visit, how many rows are needed, and what variable identifies the visit?
- A cell contains “Afternoon, 18.” Explain why this is less clear than recording the information in separate columns.