Sub topic 14
Basic Formulas and Cell References
Assume you can identify cells and ranges, enter values, and use basic copy and paste in Google Sheets. This chapter focuses on formulas: expressions that calculate a result from values in cells.
How formulas work
A formula always begins with an equals sign (=). Sheets evaluates the expression and displays the result in the formula cell. If a referenced cell changes, Sheets recalculates the result.
For example, enter these values:
| Cell | Value |
|---|---|
| B2 | 12 |
| B3 | 8 |
| B4 | 5 |
In B5, enter:
=SUM(B2:B4)The result is 25. B2:B4 is a range, which means all cells from B2 through B4. The colon represents a continuous range.
You can also use arithmetic operators:
+adds values.-subtracts values.*multiplies values./divides values.- Parentheses control the order of calculation.
For example:
=(B2+B3)*B4Sheets adds B2 and B3 first, then multiplies the result by B4.
Relative and absolute references
A cell reference is relative by default. When you copy a formula to another cell, Sheets changes the reference to match the new location.
Suppose B2 contains a quantity, E1 contains a tax rate, and C2 should calculate the tax:
=B2*$E$1B2 is a relative reference. If you fill the formula down one row, it becomes =B3*$E$1.
$E$1 is an absolute reference. The dollar signs lock both the column and row, so the reference remains E1 when you copy the formula. This is useful for a fixed rate, exchange rate, or other shared value.
A mixed reference locks only one part:
$E1locks column E but allows the row to change.E$1locks row 1 but allows the column to change.
You can press F4 while editing a reference to cycle through these reference types, depending on your keyboard settings.
Functions and ranges
Functions are built-in formulas that perform common calculations. SUM adds values, AVERAGE calculates a mean, MIN finds the smallest value, and MAX finds the largest value.
Use a function when it makes your intent clearer:
=AVERAGE(C2:C10)Avoid typing a long list of individual cells when a range expresses the same calculation. Check the selected range carefully, especially when inserting rows later.
> callout tip > A formula stores instructions, while the displayed result is only the current calculation. Select the cell and look at the formula bar to inspect the instruction.
Common errors
A missing parenthesis or quotation mark can produce a formula parse error. Dividing by zero produces #DIV/0!. A misspelled function name or invalid reference can produce #NAME? or #REF!.
When a result looks wrong, check the referenced cells, the range boundaries, and whether a number was accidentally entered as text.
Exercise
B2 contains 4, B3 contains 6, and E1 contains 0.2. What formula in C2 calculates their total with the rate applied to the sum?
Show answer
=(B2+B3)*$E$1