Week 05 · lesson

Formulas Are Instructions

A typed number is a result. A spreadsheet formula is an instruction for producing a result from other cells.

That difference matters because formulas can update when the underlying data changes—and formulas can also propagate mistakes with impressive speed.

Read formulas left to right

If cell B2 contains 82 and C2 contains 18, then:

=B2+C2

means “take the value currently in B2, add the value currently in C2, and display the result here.”

The formula does not know that one value is battery percentage and the other is app count. You are responsible for whether the operation has meaning.

Functions package common operations

Useful introductory functions include:

=SUM(B2:B6)
=AVERAGE(B2:B6)
=MIN(B2:B6)
=MAX(B2:B6)
=COUNT(B2:B6)

A simple IF can encode a transparent decision rule:

=IF(B2<30,"Check battery","OK")

That rule is not artificial intelligence. It is an explicit condition chosen by a person.

Relative references copy relationships

Suppose D2 contains:

=B2-C2

When copied to D3, Sheets normally adjusts the relationship to:

=B3-C3

This is useful because the formula describes a pattern across records. It is also a failure source if the wrong range or column is copied.

Worked trace: a correct formula answering the wrong question

A spreadsheet calculates:

=AVERAGE(B2:B11)

The arithmetic is correct. But row 11 is labeled Summary, not a device record, and contains a previously calculated average. The new formula averages the average into the raw observations.

The result is mathematically valid for the selected cells and conceptually wrong for the intended question.

This is why formula auditing begins with the data model and range, not the green check mark.

Build a Formula Trace Sheet

Using a course-safe synthetic table, write and test formulas that answer:

  1. total number of installed apps across the sample;
  2. average battery percentage for recorded values;
  3. minimum and maximum screen time;
  4. count of numeric battery observations;
  5. a simple condition flag using IF.

For each formula, record:

QuestionFormulaCells readExpected behavior if data changesCheck

Break one formula on purpose

Change a range so it excludes one valid record or includes one summary/header cell. Observe the result, then repair it.

The point is not to memorize a list of functions. It is to see formulas as inspectable instructions.

Exit check

Explain the difference between these claims:

“The spreadsheet displayed 67.4.”

and

“The average of the nine valid battery observations in B2:B10 is 67.4%.”

The second claim exposes enough of the computation to audit it.