π Lesson 2.1: Formula Basics β References, Operators & Absolute vs Relative
This is the lesson where a spreadsheet stops being a tidy grid and starts being a calculating machine. You'll write your first formulas, learn the operators that do the math, and meet the single most important idea in the whole module: the difference between references that move when you copy a formula and one you deliberately lock in place. Get this, and every formula for the rest of the course becomes easy.
π What You'll Learn
By the end of this lesson, you will be able to:
- Write a formula that starts with
=and understand that a cell shows the result but stores the logic - Use arithmetic operators
+ - * /, the exponent^, percentages, and parentheses to control order of operations - Explain what a relative reference is and why it shifts when you copy a formula β usually exactly what you want
- Use absolute and mixed references (
$A$1,A$1,$A1) and the F4 key to lock a reference in place - Read a formula back, spot common typos, and recognize first errors like
#DIV/0!and#VALUE!
β±οΈ Estimated Time: 50 minutes
π― Project: Build a small "receipt" calculator β quantity Γ price on each row, a subtotal with SUM, and a tax line that locks onto a single tax-rate cell with an absolute reference β then copy the row formula down and watch the references adjust themselves.
In This Lesson
What a Formula Actually Is
In Lesson 1.1 we said a spreadsheet stores the logic of your data, not just the answers. A
formula is where that logic lives. It's an instruction you type into a cell that tells
Sheets to calculate something β and the golden rule is that every formula begins with an equals sign:
=. That leading = is how Sheets knows "don't treat this as plain text; run it as
a calculation." Type 2+2 into a cell and you'll see the literal text 2+2. Type
=2+2 and the cell shows 4. The equals sign is the switch.
Here's the part that surprises newcomers: a cell shows its result, but it remembers the
logic. After you type =2+2 and press Enter, the grid displays 4 β but
the formula itself is still living underneath. Click that cell and look up at the formula bar
(the long strip just above the grid, next to the fx label). The grid shows 4; the
formula bar shows =2+2. That's the whole trick of spreadsheets in one picture: the surface is
the answer, the formula bar is the truth.
π Definition
Formula bar: the editable strip above the grid that shows what a cell really contains. When a cell displays a number, the formula bar reveals whether that number was typed or calculated. Whenever a cell surprises you, click it and read the formula bar first β it's the single most useful debugging habit in all of spreadsheets.
Typing a reference vs clicking a cell
The real power comes when a formula points at other cells instead of fixed numbers. Instead of
=2+2, you write =A1+A2. Now the formula says "add whatever is in A1 to whatever
is in A2" β and if you later change A1, the answer updates by itself. That address, like A1,
is called a cell reference.
There are two ways to put a reference into a formula, and both are worth knowing:
- Type it β literally type the letters and numbers:
=A1+A2. Fast once you know the addresses. - Click it β type
=, then click the cell A1 with your mouse, type+, then click A2, then press Enter. Sheets fills in the address for you. This is the beginner-friendly way, and it almost eliminates typos.
Clicking has a lovely side effect: as you build the formula, Sheets highlights each referenced cell in a matching color, so you can literally see which cells your formula is pulling from. Use clicking while you're learning; you'll drift toward typing as the addresses become second nature.
β Pro Tip
To see every formula on a sheet at once (instead of its results), press Ctrl+` (the backtick key, usually above Tab) β or use the menu View β Show β Formulas. It's a great way to audit a sheet and understand how someone built it. Press it again to switch back to results.
Operators & Order of Operations
An operator is a symbol that tells a formula what kind of math to do. You already know most of them from a calculator; a couple have spreadsheet-specific spellings. Here's the arithmetic family:
| Operator | Meaning | Example | Result |
|---|---|---|---|
+ | Add | =10+5 | 15 |
- | Subtract | =10-5 | 5 |
* | Multiply (an asterisk, not the letter x) | =10*5 | 50 |
/ | Divide (a forward slash) | =10/5 | 2 |
^ | Exponent (raise to a power) | =2^3 | 8 |
% | Percent (divides by 100) | =50*20% | 10 |
The two that trip people up: multiplication is a star * (never the letter x), and
division is a slash /. The percent sign is a handy shortcut β 20% is just another
way of writing 0.2, so =50*20% gives 10, which is exactly "20 percent of 50."
Order of operations β parentheses are your steering wheel
Sheets follows the same math rules you learned in school (often remembered as PEMDAS): it does
Parentheses first, then Exponents, then Multiplication
and Division (left to right), then Addition and
Subtraction. That means =2+3*4 is 14, not 20 β the
multiplication happens before the addition, whether you meant it to or not.
When you want the addition first, wrap it in parentheses: =(2+3)*4 gives
20. Parentheses are how you take control and say "do this part first." When a formula
isn't giving the number you expect, missing parentheses are one of the first things to check.
β οΈ Important Note: Every opening parenthesis(needs a matching closing one). Sheets colors matching pairs and warns you if they don't balance, but a mismatch is the most common reason a formula won't accept. Count your parentheses when a long formula refuses to work.
Comparison operators β a preview
There's a second family of operators that don't do arithmetic β they ask true/false questions. You'll
use these heavily once we reach IF in the next lesson, so here's an early look:
| Operator | Means | Example question |
|---|---|---|
= | equal to | Is A1 equal to 100? |
< | less than | Is A1 less than 100? |
> | greater than | Is A1 greater than 100? |
<= | less than or equal to | Is A1 at most 100? |
>= | greater than or equal to | Is A1 at least 100? |
<> | not equal to | Is A1 anything other than 100? |
Don't worry about memorizing these yet β just notice that <> means "not equal" (an
unusual spelling) and that >= is written with the greater-than sign first. We put
them to work in Lesson 2.2.
Relative References β the Ones That Move
Here's a scene you'll live through constantly. You have a table of items with a quantity in column B and
a price in column C, and you want a total in column D for each row. In cell D2 you write
=B2*C2. Perfect. Now you need the same math in D3, D4, D5, and twenty more rows. Do you
retype it twenty times? No β you copy it down, and something wonderful happens.
When you copy =B2*C2 from D2 into D3, Sheets doesn't paste it literally. It becomes
=B3*C3. Copy it into D4 and it becomes =B4*C4. The references
shifted to keep pointing at the same row as the formula. This is a
relative reference: it describes a cell's position relative to the formula, like
"the two cells to my left, multiplied together." When the formula moves down a row, "two cells to my left"
still means the current row.
π§ Mindset
Think of a relative reference like giving directions from wherever you're standing: "the shop two doors to your left." If you walk down the street and give the same directions, you'll point at a different shop β because "to your left" depends on where you are. That's exactly how a relative reference behaves when you copy a formula to a new spot. This is almost always what you want, and it's why one formula can fill a thousand rows.
To copy a formula down a column, you have three easy options:
- The fill handle β click the cell, grab the little blue square at its bottom-right corner, and drag down over the rows you want to fill.
- Double-click the fill handle β if the column next to it has data, double-clicking that blue square auto-fills all the way down to the last row. A huge time-saver.
- Copy and paste β Ctrl+C the formula cell, select the range below, Ctrl+V.
In every case, the relative references adjust automatically. This is the behavior you'll rely on 90% of the time β and it's precisely why the other 10% needs the idea in the next section. Because sometimes you don't want a reference to move.
The Big Idea: Absolute & Mixed References
This is the most important concept in the module, so we'll take it slowly and it will pay you back for
years. Picture the receipt again: each row has a line total in column D, and now you want a
tax column that multiplies each line total by a tax rate. The tax rate β say 8% β lives in one
single cell, let's call it G1.
In E2 you write =D2*G1. It works for the first row. But when you copy it down, disaster:
E3 becomes =D3*G2, E4 becomes =D4*G3β¦ The D part shifting is great
(you want each row's own line total), but the G1 part shifting is wrong β G2 and
G3 are empty, so your tax collapses to zero. The reference to the tax rate needs to
stay put no matter where the formula goes.
The fix is an absolute reference. You add dollar signs to lock the address:
$G$1. Now the formula is =D2*$G$1, and when you copy it down it becomes
=D3*$G$1, =D4*$G$1 β the D shifts as before, but
$G$1 is nailed in place. Every row now multiplies its own line total by the one true tax
rate.
π§ The anchor analogy
A dollar sign is an anchor. Wherever you drop the boat, an anchored point stays
fixed. $G$1 has two anchors β one on the column G, one on the row 1 β so
neither can drift. When you find yourself pointing every row at a single shared value (a tax rate, an
exchange rate, a goal number, a starting balance), that's your cue to reach for
$ anchors.
The four combinations β and the F4 shortcut
A dollar sign can lock the column, the row, both, or neither. That gives four flavors of reference:
| Written as | Name | What's locked | Use it when⦠|
|---|---|---|---|
A1 | Relative | Nothing β both move | The usual case: each row/column does its own math |
$A$1 | Absolute | Both column and row | Every formula points at one fixed cell (a tax rate) |
A$1 | Mixed (row locked) | The row only | Copying across columns but always reading row 1 |
$A1 | Mixed (column locked) | The column only | Copying across rows but always reading column A |
You don't have to type the dollar signs by hand. Click into the reference in the formula bar and press
the F4 key: it cycles through the four forms in order β
A1 β $A$1 β A$1 β $A1 β back to A1. Tap
F4 until you get the locking you want. (On some laptops you may need
Fn+F4.)
The mixed references feel abstract now, but they're the secret behind things like multiplication tables
and grids where you copy a formula both across and down. For today, the essential skill is the full
anchor: lock a single shared constant with $A$1. Here's the whole idea in one
picture β one formula copied down a column, with the relative part shifting while the anchored part holds:
D2 times the rate"] --> A2["copies to β D2 times $G$1 stays locked"] B["Row 3 formula
D3 times the rate"] --> B2["copies to β D3 times $G$1 stays locked"] C["Row 4 formula
D4 times the rate"] --> C2["copies to β D4 times $G$1 stays locked"] A2 --> R["Relative part shifts:
D2 becomes D3 becomes D4"] B2 --> R C2 --> R A2 --> L["Absolute part holds:
$G$1 stays locked every row"] B2 --> L C2 --> L
β Pro Tip
An even cleaner habit than $G$1 is to give the cell a name. Select the
tax-rate cell, then Data β Named ranges, and call it TaxRate. Now your formula
can read =D2*TaxRate β no dollar signs, and named ranges never shift when copied. It also
makes formulas self-documenting. We lean on this more later; for now, mastering $ anchors
is the priority.
Reading & Fixing Formulas
Writing formulas is half the job; reading them back is the other half. Two small distinctions and a short list of error names will save you enormous frustration.
A range vs a single cell
A colon makes a range. A2 is one cell; A2:A10 is
"everything from A2 through A10" β nine cells in a block. Ranges are what you feed to functions like
SUM (next lesson): =SUM(A2:A10) adds the whole column of values at once. Reading
a formula, always notice whether an address has a colon: a colon means a region, no colon means a
single cell.
Common typos to check first
- Forgot the leading
=. The cell shows your text instead of calculating. The number-one beginner slip. - Used the letter x for multiply. It has to be
*. - Unbalanced parentheses. Every
(needs its). - Comma vs colon.
A2:A10(a range) is not the same asA2,A10(just those two cells). - Pointed at the wrong cell. Click the cell and read the formula bar; Sheets highlights the referenced cells so you can see the mistake.
Your first error messages
When Sheets can't complete a formula it shows a short code beginning with #. These aren't
scoldings β they're helpful hints about what went wrong. Two you'll meet early:
| Error | What it means | Typical cause |
|---|---|---|
#DIV/0! |
You divided by zero (or by an empty cell, which counts as zero) | =10/A1 when A1 is empty or 0 |
#VALUE! |
The formula got the wrong type of thing β text where it needed a number | =A1*B1 when one cell holds a word like "twelve" instead of 12 |
β οΈ Watch Out
Hover over the little red triangle or the error text and Sheets usually explains the problem in
plain language. An error is a message, not a failure β it tells you exactly which assumption broke.
We'll meet the rest of the family (#REF!, #N/A, #ERROR!) as they
come up in later lessons. For now: see a # code, read the tooltip, check the cell it
points at.
π― Project: A Receipt Calculator
Time to make every idea in this lesson real. You'll build a tiny shop receipt: a few items with
quantities and prices, a line total per row, a subtotal that adds them all up, and a tax line that locks
onto a single tax-rate cell. Then you'll copy the row formula down and watch the relative
references shift while the absolute reference stays anchored. When it clicks, you'll never fear a
$ sign again.
ποΈ Build the receipt
Objective: Create a working receipt where line totals use relative references,
the subtotal uses SUM, and the tax uses an absolute reference to one tax-rate cell.
Instructions (about 20 minutes):
- (3 min) Open a blank sheet at sheets.google.com. In row 1 type headers:
Item(A1),Qty(B1),Price(C1),Line Total(D1). - (2 min) Enter three or four items in rows 2β5. For example: Notebook, 3, 4.50 β then Pen, 10, 1.25 β then Folder, 2, 3.00. Real-ish numbers make the totals satisfying.
- (3 min) In D2 write the line total:
=B2*C2. Press Enter and confirm it shows quantity Γ price. Click D2 and read the formula bar to see the logic behind the number. - (2 min) Copy D2 down to the other rows: grab the fill handle (the blue square at D2's corner) and drag to D5, or double-click it. Click D3 and notice it now reads
=B3*C3β the relative references shifted. - (2 min) Add a subtotal. In a cell below the last row (say D7) write
=SUM(D2:D5). Label it "Subtotal" in the cell to its left. - (2 min) Set up the tax rate in its own cell. In G1 type
0.08(that's 8%) and label it in F1 as "Tax Rate". This single cell is what we'll anchor to. - (3 min) In D8 (label it "Tax") write
=D7*$G$1. Use the F4 trick: type=D7*G1, then click onG1in the formula bar and press F4 so it becomes$G$1. Then in D9 (label "Total") write=D7+D8. - (2 min) Now see why the
$matters when a formula is copied. In E1 typeLine Tax, in E2 write=D2*$G$1, and fill it down to E5. Click E4: theDreference shifted toD4, but$G$1stayed put. (Without the dollar signs, E3 would read=D3*G2β an empty cell β and show 0.) - (1 min) The experiment: change the tax rate in G1 to
0.10and watch the tax and total update instantly. Then change a quantity in column B and watch everything downstream recalculate. That living-model feeling is the whole point.
π‘ Hint β a starter layout
A B C D
1 Item Qty Price Line Total Line Tax
2 Notebook 3 4.50 =B2*C2 =D2*$G$1
3 Pen 10 1.25 =B3*C3 =D3*$G$1
4 Folder 2 3.00 =B4*C4 =D4*$G$1
7 Subtotal =SUM(D2:D5)
8 Tax =D7*$G$1
9 Total =D7+D8
F G
1 Tax Rate 0.08
If your tax shows 0 after copying, check that the tax-rate reference is $G$1 and
not a drifting G2. If a line total shows #VALUE!, make sure the price
and quantity cells hold numbers, not text.
β Project Completion Checklist
- Each row's Line Total uses a relative formula like
=B2*C2 - You copied the line-total formula down and confirmed the references shifted per row
- Your Subtotal uses
=SUM(D2:D5)over the correct range - Your Tax formula anchors the tax rate with
$G$1(created with F4) - You filled the Line Tax formula down column E and every row still points at
$G$1 - Changing the tax-rate cell updates the tax and total automatically
- Changing a quantity recalculates its line total, the subtotal, tax, and total
π― Quick Quiz
Question 1: You copy the formula =B2*C2 from cell D2 down into cell D5. What does the formula in D5 become?
Question 2: Your tax rate lives in cell G1, and every tax formula must keep pointing at it even after you copy the formula down. How should you reference G1?
Best Practices for Writing Formulas
β Do's
- Start simple, then copy. Get one row's formula perfect, verify it, then fill down. Fixing one formula beats fixing twenty.
- Click cells while learning. Building references by clicking almost eliminates typos and shows you which cells feed the formula.
- Anchor shared constants. Any value every formula reads β a tax rate, a goal, a rate β should be
$A$1or a named range. - Read the formula bar. When a number looks wrong, click the cell and check the logic, not just the result.
β Don'ts
- Don't bury raw numbers inside formulas. Writing
=D7*0.08hides the tax rate; put 0.08 in a cell and reference it, so you can change it in one place. - Don't retype a formula many times. If you're typing the same shape twice, you should be copying instead.
- Don't ignore an error code. Hover it, read it, fix the cause β errors are directions, not dead ends.
π‘ Pro Tips
- Press F4 repeatedly to cycle a reference's locking instead of typing dollar signs by hand.
- Toggle Ctrl+` to see all formulas at once β a fast way to sanity-check a whole sheet.
π Learning Journal
Keep a learning journal as you work through this course β a document, a note, or even a tab in your own spreadsheet. After each lesson, take a few minutes to write down:
- Key concepts you learned
- Techniques that clicked for you
- Questions or confusion points to revisit
- Ideas you want to try in your own sheets
- Your progress and feelings about learning this β including where your confidence grew
βοΈ This lesson's prompt: Describe the difference between a relative reference
and an absolute reference in your own words β imagine you're explaining it to a friend who has never
used a spreadsheet. What real situation in your own planned sheet would need a locked
$A$1-style reference? Did the dollar-sign idea click on the first try, or did copying the
tax formula down make it real?
π Lesson Summary
π Key Takeaways
- A formula starts with
=. The cell shows the result, but the formula bar reveals the stored logic. - Operators do the math:
+ - * /,^for powers,%for percent. Parentheses control the order of operations. - A relative reference like
B2shifts when you copy a formula β usually exactly what you want, so one formula can fill a whole column. - An absolute reference like
$G$1locks in place; mixed references (A$1,$A1) lock one part. Press F4 to cycle them. - Read formulas by watching for a colon (a range) and by clicking the cell;
#DIV/0!and#VALUE!are helpful hints, not failures.
π What You've Accomplished
You built a real, self-updating receipt calculator β line totals, a SUM subtotal, and a tax line anchored to a single rate cell. More importantly, you now own the concept that unlocks the rest of spreadsheets: knowing when a reference should move and when it should stay. That single idea will save you from the most common formula bug there is.
β Common Questions at This Stage
When exactly should I use $ signs?
Ask yourself: "When I copy this formula, should this particular reference move with it, or point at
the same fixed cell every time?" If it should stay fixed β a tax rate, a goal number, a single
starting value that many rows share β lock it with $. If it should track each row's own
data, leave it relative. Most references in a normal table stay relative; the shared constants get
anchored.
My F4 key doesn't add dollar signs β what's wrong?
Two things to check. First, your cursor has to be inside a cell reference in the formula
(either while editing the formula or clicked into the reference in the formula bar). Second, some
laptops treat the function-key row as media keys, so you may need Fn+F4. If all
else fails, you can always type the $ signs by hand.
Why did my whole column suddenly show #DIV/0!?
Something in the formula is dividing by an empty cell or a zero. Very often it's a copied formula whose denominator reference drifted onto a blank cell (a case where you may have wanted an absolute reference). Click an affected cell, read the formula bar, and check what's on the bottom of the division.
π Looking Ahead
In the next lesson β Lesson 2.2: Everyday Functions β SUM, AVERAGE, COUNT, IF, ROUND &
TODAY β we swap hand-built arithmetic for named, pre-built functions. You'll add, average,
count, round, stamp today's date, and make your sheet decide things with IF. The
reference skills from today carry straight in.
β Before the Next Lesson
- Confirm your receipt recalculates when you change a quantity or the tax rate
- Try pressing Ctrl+` to view all formulas, then toggle back
- Write your Learning Journal entry, especially the relative-vs-absolute explanation
π Additional Resources
- Add formulas & functions (Google Support)
- Google Sheets function list (Google Support)
- sheets.google.com β practice in your own sheet
π Encouragement for the Journey
You just crossed the line from "typing data" to "describing math," and you tamed the concept that trips up most beginners for years. Every powerful thing coming β functions, lookups, dashboards β sits on the foundation you laid today. Take a breath, admire your self-updating receipt, and let's go learn the functions that do the heavy lifting. π